#arc4
RC4 stream cipher
my original python code
Installation
Install through NPM
npm install arc4
or
git clone git://github.com/hex7c0/arc4.git
API
inside nodejs project
var rc4 = require('arc4')('secret_key');
rc4.codeString('foo');
methods
change your key (warning)
rc4.change('foo');
encode string data
rc4.codeString('string');
encode byte data
rc4.codeByte([49,50,51]);
encode string or byte
rc4.code('string or byte');
same methods with RC4A
postifx for RC4A
rc4.codeRC4A('string or byte');
same methods with VMPC
postifx for VMPC
rc4.codeVMPC('string or byte');
same methods with RC4p
postifx for RC4+
rc4.codeRC4p('string or byte');
rc4(param)
param
- String | Array Your key (default "throw Error")
Examples
Take a look at my examples
License
Copyright (c) 2014 hex7c0
Licensed under the GPLv3 license