Skip to content

lahirudanushka/RC4-Crypto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RC4-Cipher Encryption and Decryption

Build Status

In cryptography, RC4 is a stream cipher. While it is remarkable for its simplicity and speed in software, multiple vulnerabilities have been discovered in RC4, rendering it insecure. It is especially vulnerable when the beginning of the output keystream is not discarded, or when nonrandom or related keys are used.

  • Easy to implement
  • Seperate functions for Encrypt and Decrypt
  • Light weight

Installation

RC4-Cipher requires Node.js v4+ to run.

Install the package.

$ cd your-root-directory
$ npm install rc4-cipher

Usage example...

//import
const rc4 = require('rc4-cipher');

//encrypt
const encryptedString = rc4.encrypt('ABC','key');

//decrypt
const decryptedString = rc4.decrypt(encryptedString, 'key');

//key - custom private key - default - rc4@123 

License

MIT

Free Software, Hell Yeah!