raptor-blowfish
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

npm

Raptor-Blowfish 🐡

A TypesScript implementation of the Blowfish cipher to encrypt/decrypt messages in ECB and CBC modes.

Installation

npm install raptor-blowfish

Usage

import { Fish } from 'raptor-blowfish';

//ECB
const enc = Fish.createCipher('myLovelyKey');
const encrypted = enc.encrypt('Toxic'); // +OK O3mP5.mY3eCZ

const dec = Fish.createDecipher('myLovelyKey');
const decrypted = dec.decrypt('+OK O3mP5.mY3eCZ') // Toxic

//CBC
const cbcEnc = Fish.createCipher('cbc:myLovelyKey');
const cbcEncrypted =  enc.encrypt('Toxic');

const cbcDec = Fish.createDecipher('cbc:myLovelyKey');
const cbcDecrypted = dec.decrypt(cbcEncrypted) // Toxic

Readme

Keywords

Package Sidebar

Install

npm i raptor-blowfish

Weekly Downloads

11

Version

1.3.0

License

MIT

Unpacked Size

11.8 kB

Total Files

19

Last publish

Collaborators

  • fsjohnny