function encrypt(encrypted, publicKey) {
const encrypt = crypto.publicEncrypt(publicKey, Buffer.from(encrypted));
return encrypt;
}
var ciphertext = this.encrypt("***",key.exportKey('public'))
Use the public and private keys generated by node rsa to encrypt using crypto and public key. How can I solve it?
I tried the conversion between uint8array and buffer, but it's different