摘要:
(0)-操作成功完成。(1)-功能错误。(2)- 系统找不到指定的文件。(3)-系统找不到指定的路径。(4)-系统无法打开文件。(5)-拒绝访问。(6)-句柄无 效。(7)-存储控制块被损坏。(8)-存储空间不足,无法处理此命令。(9)-存储控制块地址无效。(10)-环境错 误。(11)-试图加载格式错误的程序。(12)-访问码无效。(13)-数据无效。(14)-存储器不足,无法完成此 操作。(1... 阅读全文
摘要:
1)RSA_PKCS1_PADDING 填充模式,最常用的模式 输入RSA_size(rsa) – 11输出和modulus一样长 2)RSA_PKCS1_OAEP_PADDINGRSA_size(rsa) – 41 3)RSA_NO_PADDING 不填充 阅读全文
摘要:
// BCD转ASCII int Asc2Bcd(unsigned char *input, unsigned int inputLen, unsigned char *output) { unsigned char temp; unsigned int i; if (input == NULL || output == NULL) { return -1; ... 阅读全文
摘要:
/****************************************************** psHex---十六进制数组 pszStr----转换后的字符串(长度至少为3*uiHexLen) uiHexLen---十六进制数组长度 uiBytesPerLine---每行存放多少个十六进制数(为0时不做换行控制) 返回值: > 0---转换后字符串的长度 ... 阅读全文
摘要:
简介 TEA是一种简单高效的加解密算法,以速度快,实现简单著称。TEA算法每一次可以操作64-bit数据,采用128-bit作为key,算法采用迭代的形式,推荐的迭代轮数是64,最少32。 代码(默认32轮) void encrypt(unsigned long *v, unsigned long *k) { unsigned long y=v[0], z=v[1], sum=0, i; ... 阅读全文
摘要:
Step 1: Add repository sudo add-apt-repository ppa:webupd8team/atom Step 2: Update the repository sudo apt-get update Step 3: Install Atom sudo apt-get install atom 阅读全文
摘要:
$ sudo add-apt-repository ppa:webupd8team/sublime-text-3 $ sudo apt-get update $ sudo apt-get install sublime-text-installer 阅读全文
摘要:
#include #include //终端操作头文件 char getch(void){ struct termios tm, tm_old; int fd = 0, ch; if (tcgetattr(fd, &tm) < 0) { //保存现在的终端设置 return -1; } tm_old = tm; ... 阅读全文
摘要:
定义: 每个文件有9个访问权限,可将其分为3类: 标记 含义 S_IRUSR 用户读 S_IWUSR 用户写 S_IXUSR 用户执行 S_IRGRP 组读 S_IWGRP 组写 S_IXGRP 组执行 S_IROTH 其它读 S_IWOTH 其它写 S_IXOTH 其它执行 阅读全文
摘要:
正确的关机流程是:sync –> shutdown/reboot/halt/poweroff sync 将数据由内存同步到硬盘中。 shutdown 关机指令。例如你可以运行如下命令关机: shutdown –h 10 ‘This server will shutdown after 10 mins 阅读全文