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

lockandkey

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lockandkey

lock and unlock stuff using a key

latest
Source
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

lock and key

lock and unlock stuff using a key

$ npm install lockandkey

find a cryptographic key and use it on some strings.

var key = '6466d1a33b8c33d5a644c5e5967f1f4551b503c0d9c55f1dd3236e4ff6de980';
var lak = require('lockandkey');
var lock = lak.lock;
var unlock = lak.unlock;

var locked = lock('done deal', key); //ciphered base64 string, locked up!
var unlocked = unlock(locked, key); //'done deal'

if you need help finding a cryptographic key, check the test directory and run a diffie helman exchange.

node buffers work well over the protocols. generate the keys and dont touch: just maintain node buffers end-to-end they'll arrive intact for computing the secret key.

run the example

$ git clone https://github.com/reqshark/lockandkey && cd lockandkey; npm i
$ node test

Keywords

encryption

FAQs

Package last updated on 21 Mar 2015

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