#259·jsencrypt

Can not support PrivateKey encrypt and PublicKey decrypt

Author: jackieonwayCreated Sep 13, 2022Updated Sep 12, 2024

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)