package main import ( "crypto" "crypto/rand" "crypto/rsa" "crypto/x509" "encoding/base64" "encoding/pem" "errors" "fmt" "io/ioutil" ) func main() { st ...
分类:
编程语言 时间:
2020-01-28 23:33:30
阅读次数:
135
1、Https过程 2、Nginx配置https 1)生成私钥和公钥 命令:openssl req -x509 -newkey rsa:2048 -nodes -sha256 -keyout localhost-privkey.pem -out localhost-cert.pem 2、配置test ...
分类:
Web程序 时间:
2020-01-28 21:16:38
阅读次数:
99
Git 配置 ssh key 是为了识别并区分不同的主机,所以一台主机要使用 Git 进行远程仓库托管代码,首先要在本机生成 ssh key,并配置到对应远程仓库网站(比如:Github、Gitee)。 1. 生成 ssh key 在 git 终端输入: 然后git终端会询问保存路径(建议直接 en ...
分类:
其他好文 时间:
2020-01-28 15:38:01
阅读次数:
82
通过openssl生成证书 (1)设置server.key,这里需要设置两遍密码: (2)参数设置,首先这里需要输入之前设置的密码: 然后需要输入如下的信息 (3)写RSA秘钥(这里也要求输入之前设置的密码): (4)获取证书 (5)完成这一步之后就得到了我们需要的证书文件和RSA私钥了 serve ...
分类:
Web程序 时间:
2020-01-28 14:13:30
阅读次数:
117
非对称加密示例 (SSL.SSL工作过程.非对称加密) Alice和Bob进行加密传输 Bob公开自己的公钥91 Alice把三位数123乘以91,将乘积的末三位发给Bob 如123×91=11193;将193发送给Bob Bob将收到的数乘11,取后三位,得到原始信息 如:193×11=2123, ...
分类:
Web程序 时间:
2020-01-27 12:22:39
阅读次数:
117
1.执行指令 ==使用rsa协议生成公匙和私匙== 2.三次确认,使用默认存放位置,密码为空,确认密码为空 3./root/.ssh 公匙和私匙存放位置 4.开放公匙登录服务器 ...
分类:
其他好文 时间:
2020-01-22 16:04:54
阅读次数:
76
1、ANSI 多字节编码 最早时计算机只支持英文字符,都是用 ASCII(American Standard Code for Information Interchange,美国标准信息交换代码)编码,一个字母或符号只需要一个字节存储。微软针对本地化字符编码采用的就是用 ANSI(American ...
分类:
其他好文 时间:
2020-01-21 18:10:03
阅读次数:
73
注册机工作原理传送门:github地址 使用navicat-patcher.exe替换掉navicat.exe和libcc.dll里的Navicat激活公钥 navicat-patcher.exe <Navicat installation path> [RSA-2048 PEM file] 1 N ...
分类:
其他好文 时间:
2020-01-21 13:34:12
阅读次数:
752
An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the ...
分类:
其他好文 时间:
2020-01-21 13:21:50
阅读次数:
88
ssh-keygen -t rsa -C "1032671220@qq.com" 输入完毕指令,输入密码。然后会在 /z/.ssh/文件夹下生成一个私钥rsa_id、公钥rsa_pub。 使用下列命令把生成的公钥复制到git网站SSL设置里面。 cat ~/.ssh/id_rsa.pub | pbc ...
分类:
其他好文 时间:
2020-01-20 18:49:34
阅读次数:
67