crypto-browserify icon indicating copy to clipboard operation
crypto-browserify copied to clipboard

Blowfish support

Open sayem314 opened this issue 6 years ago • 2 comments

How do I do this?

const decryptChunk = (chunk, blowFishKey) => {
  let cipher = crypto.createDecipheriv('bf-cbc', blowFishKey, Buffer.from([0, 1, 2, 3, 4, 5, 6, 7]));
  cipher.setAutoPadding(false);
  return cipher.update(chunk, 'binary', 'binary') + cipher.final();
}

sayem314 avatar Sep 16 '19 20:09 sayem314

This could be added onto via the use of a JS Blowfish module and a PR. I'll see if there's any that might do the job here.

rawr51919 avatar Feb 02 '21 22:02 rawr51919

Seeing how the repo is implemented, though, it'd require a polyfill for your usage case

rawr51919 avatar Feb 02 '21 23:02 rawr51919