https://github.com/irfanshadikrishad/cipher
A versatile and secure cryptographic library for implementing various cipher algorithms in Node.js applications.
https://github.com/irfanshadikrishad/cipher
cipher cryptography npm-package npmjs
Last synced: 4 months ago
JSON representation
A versatile and secure cryptographic library for implementing various cipher algorithms in Node.js applications.
- Host: GitHub
- URL: https://github.com/irfanshadikrishad/cipher
- Owner: irfanshadikrishad
- License: mpl-2.0
- Created: 2025-02-28T23:08:37.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2026-02-16T09:58:21.000Z (4 months ago)
- Last Synced: 2026-02-16T16:24:26.373Z (4 months ago)
- Topics: cipher, cryptography, npm-package, npmjs
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@irfanshadikrishad/cipher
- Size: 606 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.cff
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
#### @irfanshadikrishad/cipher
A versatile and secure cryptographic library for implementing various cipher algorithms in Node.js applications with zero/0 dependencies.



#### 🚀 Installation
Install the package via npm:
```bash
npm install @irfanshadikrishad/cipher
```
yarn:
```bash
yarn add @irfanshadikrishad/cipher
```
bun:
```bash
bun add @irfanshadikrishad/cipher
```
#### Usage
Import the library and use a cipher algorithm:
```ts
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:
| Cipher | Type | Key required? | Strength | Used In/Notes |
| --------------------------------------------------- | ---------------------------------------- | ------------- | --------- | ----------------------------------------------------- |
| [Caesar Cipher](/docs/en/ciphers/CAESAR.md) | Substitution | No | Low | Ancient Rome, Simple Obsfuscation |
| [Atbash Cipher](/docs/en/ciphers/ATBASH.md) | Substitution | No | Low | Hebrew Cipher, Basic Encryption |
| [Playfair Cipher](/docs/en/ciphers/PLAYFAIR.md) | Diagraph-based | Yes | Medium | Used in WWI & WWII |
| [Vigenère Cipher](/docs/en/ciphers/VIGENERE.md) | Polyalphabetic | Yes | Medium | Used in Historical Documents |
| [The Alphabet Cipher](/docs/en/ciphers/ALPHABET.md) | Polyalphabetic | Yes | Medium | Inspired by Vigenere, Cryptography Puzzles |
| [Salsa20](/docs/en/ciphers/SALSA20.md) | Stream Cipher | Yes | High | Modern Cryptography, Secure Communications |
| [ADFGVX](/docs/en/ciphers/ADFGVX.md) | Polybius Square + Columnar Transposition | Yes | Medium | Used in WWI, Known for 6x6 polybius square |
| [AES](/docs/en/ciphers/AES.md) | Symmetric Block Cipher | Yes | High | Also known as, Rijndael |
| [DES](/docs/en/ciphers/DES.md) | Symmetric Block Cipher | Yes | Medium | 56-bit key, Used in legacy systems, replaced by AES |
| [ECC](/docs/en/ciphers/ECC.md) | Asymmetric (Public-Key Cryptography) | Yes | Very High | Used in modern systems like Bitcoin, TLS, JWT, etc. |
| [ROT13](/docs/en/ciphers/ROT13.md) | Substitution (Caesar variant) | No | Very Low | Simple text obfuscation, not secure |
| [Nihilist](/docs/en/ciphers/Nihilist.md) | Polybius Square + Addition | Yes | Medium | Used by Russian Nihilists, Polybius + additive cipher |
More ciphers coming soon...
#### Contribution
To contribute on the codebase, follow [contribution guideline](/docs/en/CONTRIBUTING.md).
#### Support
If you find this library useful, consider giving it a ⭐ on GitHub!
Thanks for visiting! (>'-'<)