jsencrypt
jsencrypt copied to clipboard
Can not support PrivateKey encrypt and PublicKey decrypt
i can not use this to encrypt data by private key and decrypt data by public key. such as
const encryptor = new JSEncrypt();
encryptor.setPrivateKey(privateKey); // set private key;
return encryptor.encrypt(data);
const decryptor = new JSEncrypt()
decryptor.setPublicKey(publicKey)// set public key
return decryptor.decrypt(data)
Why not use sign()?
What's the point of encrypting something to be decrypted by a public key? Keyword here is public
https://github.com/travist/jsencrypt/issues/2