Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

avoidwork/tiny-cipher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tiny-cipher

Tiny cipher/decipher

build status

Example

var cipher = require('tiny-cipher'),
    iv = cipher.iv(256),
    decoded = 'hello world!',
    encoded = cipher(decoded, true, iv);
    
console.log(encoded);
console.log(decoded === cipher(encoded, false, iv));

API

cipher(arg, encode, iv)

Returns a cipher or decipher String

iv(size=256)

Returns a random byte String of a specific size

License

Copyright (c) 2015 Jason Mulligan Licensed under the BSD-3 license