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

Blowfish is not a constructor

Open expertup opened this issue 5 years ago • 2 comments

22: const Blowfish = require('javascript-blowfish');
23: const bf = new Blowfish("xxxxxxxxxxxx");

TypeError: Blowfish is not a constructor at Object. (C:\Users\Piotr\Documents\Application\app.js:23:12) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Function.Module.runMain (internal/modules/cjs/loader.js:742:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)

I'm runnig node on widnows 10, Node version v10.15.0, NPM version 6.7.0.

I want send encrypted key from server to browser and decode them. When I try initiate Blowfish (line 23) I get error.

expertup avatar May 09 '19 20:05 expertup

Same problem with you - _ - !

kipa-zhang avatar Nov 22 '19 03:11 kipa-zhang

Just use const Blowfish = require("javascript-blowfish").Blowfish

kennedyoliveira avatar Dec 13 '19 00:12 kennedyoliveira