0x01 生成密钥对
1、添加一个变量密钥,类型为RSA密钥生成类
2、添加一个变量字节集变量,类型为字节集类,用来接受公钥和私钥
密钥.生成密钥对 () 字节集变量 = 密钥.取公钥数据 () 调试输出 (多字节到文本 (字节集变量)) 字节集变量 = 密钥.取私钥数据 () 调试输出 (多字节到文本 (字节集变量)) -----BEGIN PUBLIC KEY----- MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJYZ0bp2ElHn4i0sBSBJSnibpR 8Fx7LaD4MnJU4j1FMhTTIz3/7QswSbvYuZgFbTPdGNxDhVUQvrx1PJIDOZZO6P9V 9kSV0zPQhyuGGvBGbN7OnLp3kVuD4nwv5zOxLzjXyQkj8sKTdQIJl0U4xFomlnLq rTDIf0TmWkyXSkVA+wIDAQAB -----END PUBLIC KEY----- -----BEGIN RSA PRIVATE KEY----- MIICXAIBAAKBgQDJYZ0bp2ElHn4i0sBSBJSnibpR8Fx7LaD4MnJU4j1FMhTTIz3/ 7QswSbvYuZgFbTPdGNxDhVUQvrx1PJIDOZZO6P9V9kSV0zPQhyuGGvBGbN7OnLp3 kVuD4nwv5zOxLzjXyQkj8sKTdQIJl0U4xFomlnLqrTDIf0TmWkyXSkVA+wIDAQAB AoGAKs9hgrt2X1m4HtcGo2jt4R/aSAj84AK3MYwn2fuuYsNewfO//mP5+O3zzQLH Wn/4gowCZyg1CTZDAfk6YQ0g8ozw3E8Z1U0mXRIgeN43T/c1WoXUFCIHRn8DdL40 5bl+hU3EKkEQzBL656bqMa9hVIwTwHkEzqHoeJcfs34V6QECQQDmzXc0EXfErZHn EAyvO61Xxxt1rDHDv6J/rjzsVTedZCGk27nTI2PdFSP1odtk8WygvDK4i8Selxis SyPFv4NbAkEA313fpCwgpd3jn6NSDIUTtRPYlDqOmlEfFXJfb2jgWh0OtBApRic2 lH1ZbwlMSrNBsC1pJk6V8gqWfR928HfK4QJAOc1JRjv9r778ZE7LrnMWpX4S7XRz fh+XNbzQOyvYYs1584ynzC33y52IxPKFPJGN7+9SEI/IbSNQJY4n5lVhMwJAShlN MJxG9F9ovLOka2zWPdLonTvTxNO2eRnpGP90tdA/6XIXDyPBEn+G5LPz8DAJUZWu 9TtKuPHUPIvsnBdRYQJBAIhDqWf6xM5lQB4bcza0kQTKIMQo8kGFWDy4cAUPhmsP h/mGoGcaDztCBqxEQxqCparrXooUgFChTdPFzHWFb7Y= -----END RSA PRIVATE KEY-----
0x02 将生成密钥当做变量赋值
0x03 加密代码
加密结果 = 字节集到BASE64文本 (加解密类.加密_RSA_公钥 (文本到多字节 ("aiyou", 假), 文本到多字节 (公钥, 假), , )) OGyBU9+P0EbJcFGJZBHIjj8dLdBbCYhRxYP/ChdDIYVqXHv8lPCzONSdxq/BMjyEiXALl8PprTzs LVCRPaa+MUpG8e0fTXKLGeH4hmGkNqnLk7f1wUATijaqTDU6+1a9qcRV0mCDRVSOpYC9l37FPV65 MNhKR0rDqkJVoWF9Akw=
0x04 解密代码
将上面的结果保存为文本型变量
解密结果 = 多字节到文本 (加解密类.解密_RSA_私钥 (BASE64文本到字节集 (文本), 文本到多字节 (私钥, 假), , )) aiyou