new_hope
When I use crypto in this code, it returns 'Unknown cipher.'
const secret ="1111111111111111111";
let encryptedText='test';
const decipher = crypto.createDecipheriv('aes-256-cbc', secret, secret.slice(0, 16));
decipher.setAutoPadding(true);
let decrypted = decipher.update(encryptedText.slice(16), 'base64', 'utf8');
decrypted += decipher.final('utf8');
How to fix it?
3 replies