All Projects → egoroof → blowfish

egoroof / blowfish

Licence: MIT license
Blowfish encryption library for browsers and Node.js 🐡

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to blowfish

Enigmakit
Enigma encryption in Swift
Stars: ✭ 108 (+163.41%)
Mutual labels:  cipher
mbedcrypto
a portable, small, easy to use and fast c++14 library for cryptography.
Stars: ✭ 38 (-7.32%)
Mutual labels:  cipher
CTF-CryptoTool
CTF-CryptoTool is a tool written in python, for breaking crypto text of CTF challenges. It tries to decode the cipher by bruteforcing it with all known cipher decoding methods easily. Also works for the cipher which does not have a key.
Stars: ✭ 38 (-7.32%)
Mutual labels:  cipher
Simon Speck
The SIMON and SPECK families of lightweight block ciphers. #nsacyber
Stars: ✭ 146 (+256.1%)
Mutual labels:  cipher
Encrypt
🔒 A set of high-level APIs over PointyCastle for two-way cryptography.
Stars: ✭ 199 (+385.37%)
Mutual labels:  cipher
AES
C++ AES implementation
Stars: ✭ 365 (+790.24%)
Mutual labels:  cipher
Cipher.so
A simple way to encrypt your secure data like passwords into a native .so library.
Stars: ✭ 1,308 (+3090.24%)
Mutual labels:  cipher
WebCrypto.swift
A small collection of cryptographic functions based on the JavaScript WebCrypto API.
Stars: ✭ 16 (-60.98%)
Mutual labels:  cipher
Lua Openssl
Openssl binding for Lua
Stars: ✭ 206 (+402.44%)
Mutual labels:  cipher
django-mirage-field
Django model field encrypt/decrypt your data, keep secret in database.
Stars: ✭ 86 (+109.76%)
Mutual labels:  cipher
Crypto Async
Fast, reliable cipher, hash and hmac methods executed in Node's threadpool for multi-core throughput.
Stars: ✭ 161 (+292.68%)
Mutual labels:  cipher
Sboot stm32
Secure USB DFU1.1 bootloader for STM32
Stars: ✭ 181 (+341.46%)
Mutual labels:  cipher
SecureSnaps
Image Codec using Private-key cryptography
Stars: ✭ 13 (-68.29%)
Mutual labels:  blowfish
Chinese Cipher Of Sm2 Sm3 Sm4
This is an android-project about sending messages after encryption or getting cipher text from message database of mobile phone.U could also get the original points through your secret key
Stars: ✭ 109 (+165.85%)
Mutual labels:  cipher
crypto
🔐 Fastest crypto library for Deno written in pure Typescript. AES, Blowfish, CAST5, DES, 3DES, HMAC, HKDF, PBKDF2
Stars: ✭ 40 (-2.44%)
Mutual labels:  blowfish
Javascript
A repository for All algorithms implemented in Javascript (for educational purposes only)
Stars: ✭ 16,117 (+39209.76%)
Mutual labels:  cipher
Fingerprint
Android library that simplifies the process of fingerprint authentications.
Stars: ✭ 68 (+65.85%)
Mutual labels:  cipher
youtube-audio
extract videos from youtube in audio format using webscraping techniques 🎶
Stars: ✭ 68 (+65.85%)
Mutual labels:  cipher
fossil
Fossil is a proxy for securing unencrypted Graphite metrics collection
Stars: ✭ 21 (-48.78%)
Mutual labels:  cipher
CppSecurity
C++ Security Library
Stars: ✭ 24 (-41.46%)
Mutual labels:  cipher

Blowfish

npm package Travis

Blowfish encryption library for browsers and Node.js.

Works in Node.js 4+, IE10+ and all modern browsers.

Table of Contents

Installation

Take latest version here or with npm:

npm install egoroof-blowfish --save

Usage

All input data including key, IV, plaintext and ciphertext should be a String or ArrayBuffer / Buffer. Strings support all unicode including emoji .

Example

const Blowfish = require('egoroof-blowfish');
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 🎅');
const decoded = bf.decode(encoded, Blowfish.TYPE.STRING); // type is optional

You can play with this example in runkit: https://runkit.com/egoroof/blowfish-example

Block cipher mode of operation

https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation

Blowfish.MODE.ECB // (default) Electronic Codebook
Blowfish.MODE.CBC // Cipher Block Chaining

Padding

http://www.di-mgt.com.au/cryptopad.html

Blowfish.PADDING.PKCS5 // (default) Pad with bytes all of the same value as the number of padding bytes
Blowfish.PADDING.ONE_AND_ZEROS // Pad with 0x80 followed by zero bytes
Blowfish.PADDING.LAST_BYTE // Pad with zeroes except make the last byte equal to the number of padding bytes
Blowfish.PADDING.NULL // Pad with zero (null) characters
Blowfish.PADDING.SPACES // Pad with spaces

Return type

Which type of data should return method decode:

Blowfish.TYPE.STRING // (default) String
Blowfish.TYPE.UINT8_ARRAY // Uint8Array
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].