simpli-crypto
v1.6.0
Published
A module that simplifies crypto.
Downloads
9
Maintainers
Readme
A simplified, easy to use version of the built in Crypto library.
var sc = require('simpli-crypto')
console.log(sc.hash("some data to hash"));
var data = sc.cipher("some data to cipher", "password");
console.log(data);
console.log(sc.decipher(data, "password"));
Installation
$ npm install simpli-crypto
Features
- An oversimplified hash method.
- An easy to use cipher method.
- An easy to use decipher method.
- Alternate spellings of "cipher" and "decipher" ("cypher" and "decypher").
Functions
sc.hash(<data>, [encoding], [method]);
sc.cipher(<data>, <password>, [inenc], [outenc], [method], [autoPad]);
sc.decipher(<data>, <password>, [inenc], [outenc], [method], [autoPad]);
data: (string) data to hash/cipher
password: (string) cipher/deciper password
encoding: (string) ex: base64, hex, etc.
inenc: (string) input encoding
outenc: (string) output encoding
method: (string) hash/cipher algorithm ex: aes192, etc.
autoPad: (boolean) whether or not to use auto padding