-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
Hi. I have an Yii application using "rijndael-128", "ofb" with IV. The encrypted message is saved in mysql and read in a node.js application. I try to decrypt it. The message is stored in mysql as blob and node-mysql transform it in a Buffer. I do not change it. My algorithm is
let message = ....; //Buffer
let Decipher = new MCrypt("rijndael-128", "ofb");
let ivSize = Decipher.getIvSize();
let iv = message.slice(0, ivSize); //IV
Decipher.open(encryptionKey, iv); //encryptionKey is considered as password on Yii side
console.log(Decipher.decypher(message.slice(ivSize)); //decyper only the encrypted part, without IV
//the result printed by console.log is = "correct message" + "garbage"
How could I get rid of the garbage from the decrypted message?
Thank you
Metadata
Metadata
Assignees
Labels
No labels