rc4-crypt

1.0.4 • Public • Published

rc4-crypt

Small rc4 cryptography library

Install

npm install --save rc4-crypt

Usage

Node.JS

const rc4 = require('rc4-crypt');

// Initialize encrypt/decrypt
// The keys need to match
let encrypt = rc4("ENCRYPTION KEY"),
    decrypt = rc4("ENCRYPTION KEY");

// The data we're about to encrypt
let plainData = "Hello World";

// Actually encrypt the data
let ciphertext = encrypt(plainData);

// Let's decrypt it again
let decrypted = decrypt(ciphertext);

// Show the result
console.log(decrypted);

Browser

This module does not directly work in the browser. You'll need to use a tool like browserify to make use it.

Readme

Keywords

none

Package Sidebar

Install

npm i rc4-crypt

Weekly Downloads

9

Version

1.0.4

License

Ratus Unilicense 1.0

Unpacked Size

8.6 kB

Total Files

6

Last publish

Collaborators

  • finwo