egoroof-blowfish example

node v8.17.0
version: 3.0.0
const Blowfish = require("egoroof-blowfish@1.0.1"); const bf = new Blowfish('super key', Blowfish.MODE.ECB, Blowfish.PADDING.NULL); // only key isn't optional bf.setIv('abcdefgh'); // optional for ECB mode; bytes length should be equal 8 const encoded = bf.encode('input text even with emoji 🎅'); console.log(encoded); const decoded = bf.decode(encoded, Blowfish.TYPE.STRING); // type is optional console.log(decoded);

no comments

    sign in to comment