- 博客(5)
- 资源 (1)
- 收藏
- 关注
原创 获取系统运行时间
获取系统运行时间一、cat /proc/uptime执行cat /proc/uptime ,输出两个数字:第一个数读出来,那就是从系统启动至今的时间,单位是秒/************************************************* Function: read_line_first_word Description: 读取指定的文件中一行中的一段(到第一个空格)到一字符串中 Input: 1.文件指针 2.欲存储的字符
2021-03-08 20:03:13
1617
原创 cJSON使用
cJSON使用一、cJSON类型及数据结构/* cJSON Types: */#define cJSON_False 0#define cJSON_True 1#define cJSON_NULL 2#define cJSON_Number 3#define cJSON_String 4#define cJSON_Array 5#define cJSON_Object 6 #define cJSON_IsReference 256#define cJSON_StringIsConst
2021-03-08 16:29:23
226
原创 openssl的AES加密(base64编码)
openssl的AES加密(base64编码)【 AES加密 】在这里插入代码片AES算法的块(block)的长度固定为16字节。假设一个字符串在AES加密前的长度为cleanLen,加密后的长度为cipherLen,则二者有下面的关系,其中的“/”是整除。cipherLen = (clearLen/16 + 1) * 16比如:(注意第二行,即使48刚好能被16整除,也要额外追加一个16字节的块)clearLen cipherLen47 4848 6449 64
2021-03-05 16:46:15
999
原创 2020-12-16
loadlib加载动态库问题【 lua文件中代码 】local path = "/xxx/complib.so"local f = loadlib(path, "luaopen_complib")complib.so为要加载的C程序动态库,luaopen_complib为动态库初始化函数的函数名(complib.c文件中的)【 错误提示】lua: test.lua:6: attempt to call a nil value (global 'loadlib')stack traceback
2020-12-16 16:06:06
259
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人