1.0.0 • Published 6 years ago

keylock v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

KeyLock

Lock stuff with keys.

KeyLock is a neat little wrapper around the built-in nodejs crypto module.

Well, how do i use it?

Install it npm i keylock

Require it const KeyLock = require('keylock')

Initialize it const lock = new KeyLock('some password')

Lock something const locked = lock.lock('secret message')

Unlock something const unlocked = lock.unlock(locked)

More Detail

Parameters

FunctionArguments
new KeyLockkey, options
.newKeykey, options
.lockdata, options
.unlockdata, options

Options?

OptionExample
algoritmaes-256-cbc, aes192, rc2
inputEncodingbinary, utf8, hex
outputEncodingbinary, utf8, hex
key (.unlock & .lock)cool password, some key