Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

lan_crypto

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lan_crypto

### Install

latest
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

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);

FAQs

Package last updated on 24 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts