javascript-blowfish icon indicating copy to clipboard operation
javascript-blowfish copied to clipboard

Incorrect result with CBC

Open tandrus opened this issue 4 years ago • 1 comments

I run code from your example

const {Blowfish} = require('javascript-blowfish');

const bf = new Blowfish("key", "cbc");

// Encrypt and encode to base64
const encrypted = bf.encrypt("secret message", "cbcvecto");
const decrypted = bf.decrypt(encrypted, "cbcvecto");

console.log(decrypted);

Result of output is secret m]8⑿餸

Node version 12.16.1 Ubuntu 18.04.1

tandrus avatar Mar 30 '20 10:03 tandrus

There is a change suggested in #5 but even with that change I can't seem to have a correct result with CBC.

nbastoWM avatar Dec 10 '20 09:12 nbastoWM