blowfish.js
blowfish.js copied to clipboard
Decrypt string and original string are not equal
Hi, i trying to test the script for a project. But i noted that after decryptation the string is not equal to the original.Why?
This is my code:
var bf = new Blowfish('text code'); var test = "test"; var ciphertext = bf.encrypt(test); var plaintext = bf.decrypt(ciphertext);
console.log(plaintext);
alert(test === plaintext);
Thanks for help !
Because of padding. Take a look at https://github.com/egoroof/blowfish