feat:
1. add APPUserController
This commit is contained in:
@@ -15,18 +15,21 @@ public class Sm2KeyGenerator {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("================ blade.oauth2 配置如下 =================");
|
||||
AsymmetricCipherKeyPair keyPair = SM2Util.generateKeyPair();
|
||||
// AsymmetricCipherKeyPair keyPair = SM2Util.generateKeyPair();
|
||||
// String publicKey = SM2Util.getPublicKeyString(keyPair);
|
||||
// String privateKey = SM2Util.getPrivateKeyString(keyPair);
|
||||
|
||||
String publicKey = "049a315b42a9fd789c321442185f0375fdd7686461fad1276e999a738700375ece22e8a343052ee6be0d1cba174adacaa875c4ffdd0a2b936df26c330f5815599a";
|
||||
String privateKey = "3d3713f75f9d91583360388428693ddbebd480b8141414b59655a6e6bbbaec15";
|
||||
|
||||
String phone = "13370065231";
|
||||
byte[] encryptedData = SM2Util.encrypt(phone, publicKey);
|
||||
String decryptedText = SM2Util.decrypt(encryptedData, privateKey);
|
||||
System.out.println("加密后: " + Hex.toHexString(encryptedData));
|
||||
System.out.println("解密后: " + decryptedText);
|
||||
String passwd = "Qq!123456";
|
||||
byte[] encryptedData = SM2Util.encrypt(passwd, publicKey);
|
||||
// String decryptedText = SM2Util.decrypt(encryptedData, privateKey);
|
||||
System.out.println("SM加密后: " + Hex.toHexString(encryptedData));
|
||||
// System.out.println("解密后: " + decryptedText);
|
||||
|
||||
String encryptPasswd = DigestUtil.encrypt(passwd);
|
||||
System.out.println("encrypt加密后: " + encryptPasswd);
|
||||
|
||||
|
||||
// System.out.println("#blade配置 \n" +
|
||||
|
||||
Reference in New Issue
Block a user