javascript-blowfish
javascript-blowfish copied to clipboard
Unexpected results with CBC
Hello,
I have unexpected results that are not the same as http://www.txtwizard.net/crypto and other websites.
My code:
const bf = new Blowfish('secret', 'cbc');
const encrypted = bf.encrypt('message', '00000000');
const base64Encrypted = bf.base64Encode(encrypted);
console.log(base64Encrypted);
Output:
fzAONXVl9nA=
Output with the same parameters from txtwizard:
/ClZ1D/um40=
I think it is because the padding is not PKCS5 by default. With other libraries which use PKCS5, it's working.