linux应用编程学习
蜜汁辣酱^_^
有问题请发邮件到2815287145@qq.com讨论
展开
-
openssl非对称加密填充OAEP
上班访问外网限制,只能访问csdn,个人练习工程代码/* crypto/rsa/rsa_oaep.c */int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen, const unsigned char *from, int flen, const unsigned char *param, int plen){原创 2021-07-06 01:14:00 · 671 阅读 · 0 评论 -
openssl与mbedtls互相aes加密解密
上班访问外网限制,只能访问csdn,个人练习工程代码文件读取 1k字节解密加密 256bit cbc模式 mbedtls加密 openssl解密#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <string.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h&g原创 2021-07-06 01:08:21 · 992 阅读 · 0 评论 -
openssl非对称加密填充OAEP
/* crypto/rsa/rsa_oaep.c */int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen, const unsigned char *from, int flen, const unsigned char *param, int plen){ return RSA_padding_add_PK原创 2021-07-06 01:00:03 · 624 阅读 · 0 评论 -
rename函数
#include <stdio.h>int rename(const char *oldpath, const char *newpath);#include <fcntl.h> /* Definition of AT_* constants */#include <stdio.h>int renameat(int olddirfd, const char *oldpath, int newdirfd, cons原创 2020-12-28 23:29:28 · 1746 阅读 · 0 评论 -
标准io读写fopen、fclose、fwrite、fread、fseek
好记心不如烂笔头,c库在普通读写io,open、close的基础上创建了一套新的文件读写接口函数#include <stdio.h>FILE *fopen(const char *path, const char *mode);FILE *fdopen(int fd, const char *mode);/* 返回0关闭成功,EOF返回失败 */int fclose(FILE *stream);参数:path 为文件路径的字符串mode:r 以只读文本文件权限打开,文件偏原创 2020-12-20 23:06:58 · 220 阅读 · 0 评论 -
文件打开关闭、读写操作open、read、write、lseek、pread、pwrite
好记性不如烂笔头C语言文件操作 read, write, close, lseek#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>int open(const char *pathname, int flags);int open(const char *pathname, int flags, mode_t mode);int creat(const char *pathnam原创 2020-12-20 22:07:23 · 700 阅读 · 0 评论 -
stat函数获取分析文件属性
linux 文件属性,终端下ls和stat命令查看,在c程序中怎么处理呢lala0903@lala0903-virtual-machine:/var/cache/apt/archives/stlink$ ls -ltotal 128drwxr-xr-x 5 root root 4096 12月 17 21:58 build-rw-r--r-- 1 root root 40768 12月 17 00:45 CHANGELOG.mddrwxr-xr-x 4 root root 4096 12月 1原创 2020-12-17 22:42:26 · 166 阅读 · 0 评论