1.0.1 • Published 6 years ago
hcz-rsa v1.0.1
#rsa-js
rsa , pure js, 兼容小程序
const encrypt = new JSEncrypt(pubKey);
encrypt.setPublicKey(pubKey);
const encrypted = encrypt.encrypt(val);
const encrypt = new JSEncrypt();
encrypt.setPrivateKey(privateKey);
const decrypted = encrypt.decrypt(encrypted);