1.2.0 • Published 10 months ago

@irfanshadikrishad/cipher v1.2.0

Weekly downloads
-
License
MPL-2.0
Repository
github
Last release
10 months ago

@irfanshadikrishad/cipher

A versatile and secure cryptographic library for implementing various cipher algorithms in Node.js applications with zero/0 dependencies.

NPM Version NPM Downloads NPM Unpacked Size

🚀 Installation

Install the package via npm:

npm install @irfanshadikrishad/cipher

yarn:

yarn add @irfanshadikrishad/cipher

bun:

bun add @irfanshadikrishad/cipher

📖 Usage

Import the library and use a cipher algorithm:

import { Cipher } from "@irfanshadikrishad/cipher"

// Create a Caesar Cipher instance with a shift of 6
const caesar = new Cipher.Caesar(6)

console.log(caesar.encrypt("hello world")) // Output: "nkrru cuxrj"

🔐 Supported Ciphers

This library provides implementations of various classical and modern ciphers:

CipherTypeKey required?StrengthUsed In/Notes
Caesar CipherSubstitutionNoLowAncient Rome, Simple Obsfuscation
Atbash CipherSubstitutionNoLowHebrew Cipher, Basic Encryption
Playfair CipherDiagraph-basedYesMediumUsed in WWI & WWII
Vigenère CipherPolyalphabeticYesMediumUsed in Historical Documents
The Alphabet CipherPolyalphabeticYesMediumInspired by Vigenere, Cryptography Puzzles
Salsa20Stream CipherYesHighModern Cryptography, Secure Communications
ADFGVXPolybius Square + Columnar TranspositionYesMediumUsed in WWI, Known for 6x6 polybius square
AESSymmetric Block CipherYesHighAlso known as, Rijndael
DESSymmetric Block CipherYesMedium56-bit key, Used in legacy systems, replaced by AES
ECCAsymmetric (Public-Key Cryptography)YesVery HighUsed in modern systems like Bitcoin, TLS, JWT, etc.

More ciphers coming soon...

🍀 Contribution

To contribute on the codebase, follow contribution guideline.

❤️ Support

If you find this library useful, consider giving it a ⭐ on GitHub!

Thanks for visiting! (>'-'<)

1.2.0

10 months ago

1.1.0

11 months ago

1.0.10

11 months ago

1.0.9

12 months ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago