//加密 var encrypt = new JSEncrypt(); encrypt.setPublicKey(PUBLIC_KEY); var encrypted = encrypt.encryptLong("results"); console.log('加密后数据:%o', encrypted); //解密 var decrypt = new JSEncrypt(); decrypt.setPrivateKey(PRIVATE_KEY); let un = decrypt.decryptLong(encrypted); console.log('解密后数据:%o', un);
2022-04-30 13:37:23 135KB rsa encryptLong decryptLong JavaScript加密
1