fy-crypto
v1.0.7
Published
### Install
Downloads
3
Readme
lan_crypto
Install
npm install lan_crypto
Usage
var lan_crypto = require('lan_crypto');
md5:
var md5 = lan_crypto.md5();
var hash = md5.encode('hello world');
console.log('md5:',hash);
aes128:
var aes128 = lan_crypto.aes128('key','iv');
var secret = aes128.encode('hello world');
var content = aes128.decode(secret);
console.log('aes128:',secret,content);
aes256:
var aes256 = lan_crypto.aes256('key','iv');
var secret = aes256.encode('hello world');
var content = aes256.decode(secret);
console.log('aes256:',secret,content);
base64:
var base64 = lan_crypto.base64();
var en = base64.encode('hello base64');
var de = base64.decode(en); //default utf8
var de_hex = base64.decode(en,'hex');
console.log('base64:',en,de,de_hex);