Open ddzobov opened 3 years ago
No, apparently not. Check this other issue . You're probably better off using standard crypto anyway.
const crypto = require('crypto');
const MyEncryptedPrivKey = require('fs').readFileSync('./keys/enc_private.pem').toString();
const EncryptedData = [...];
let DecryptedData = crypto.privateDecrypt({
key: MyEncryptedPrivKey,
passphrase: "MY_PRIVATE_KEY_AWESOME_PASSWORD",
}, EncryptedData);
Can this library generate and work with encrypted private keys?
-----BEGIN ENCRYPTED PRIVATE KEY-----