摘要:
A,B双方通信,A想向B发送信息,又不想让别人知道,使用非对称加密:若A向B发送信息,A需要知道B的公钥简称B-pub,用B-pub加密信息后 发送给B,B再用自己的私钥B-prv解密出信息。 A想验证B的身份,可以把“123”用B-pub加密后发送给B,若B能用B-prv解密出来并发送给A,那么A 阅读全文
posted @ 2022-01-18 22:42
hellozhangjz
阅读(127)
评论(0)
推荐(0)
摘要:
一个管道文件的通信半双工的,且不能用lseek()函数操作,其他操作与普通文件一样。 1、匿名pipe #include <unistd.h> int pipe(int pipefd[2]); 功能:创建无名管道。 参数: pipefd : 为 int 型数组的首地址,其存放了管道的文件描述符 pi 阅读全文
posted @ 2022-01-18 14:33
hellozhangjz
阅读(40)
评论(0)
推荐(0)
摘要:
进程间控制 一、创建进程:fork()函数 #include <sys/types.h> #include <unistd.h> pid_t fork(void); 功能: 用于从一个已存在的进程中创建一个新进程,新进程称为子进程,原进程称为父进程。 参数: 无 返回值: 成功:子进程中返回 0,父 阅读全文
posted @ 2022-01-18 14:11
hellozhangjz
阅读(54)
评论(0)
推荐(0)
摘要:
二分查找 什么情况用二分算法 对于数组f[x]或者函数f(x) 给出x,容易求Y 给出Y,不容易求x 函数单调 泛型情况下可以把小于目标值看成0,大于等于目标值看成1,问题就转化成查找第一个1的情况。 int binary_search_find_first_one(vector<int> nums 阅读全文
posted @ 2022-01-18 13:41
hellozhangjz
阅读(31)
评论(0)
推荐(0)
摘要:
#include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <string.h> const i 阅读全文
posted @ 2022-01-18 11:17
hellozhangjz
阅读(50)
评论(0)
推荐(0)
摘要:
软件下载主页: https://gitee.com/ylzheng/CopyTranslator/wikis/windows 可以设置始终置顶,监听剪切板,翻译起来非常方便 阅读全文
posted @ 2022-01-18 09:43
hellozhangjz
阅读(449)
评论(0)
推荐(0)

浙公网安备 33010602011771号