Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

rc4-crypt

finwo8Ratus Unilicense 1.01.0.4

Small rc4 cryptography library

readme

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.