I have my php code as follows:
openssl_encrypt($string, 'AES-256-CBC', $key, 0, $iv);
and my nodejs code:
crypto.createDecipheriv('aes-256-cbc', 'key', 'iv')
The key in my php code is 64 characters long when printing to console. However, when I use the same key to decipher my code in nodejs it is only happy when I use 32 characters for my key. I've tried using just the first 32 characters of the key I'm using in my php encryption code, but it's not working. Could anyone explain where I'm going wrong here? Thanks.