lokbox

0.1.3 • Public • Published

LOKBOX

Capable: JSON, BLOWFISH, UTF8

[Note: All Copyrights/Trademarks aformentioned are heretoforth property of their respective parties. No ownership claimed] Written + Modified by Emanuel Fludd email: emanuelfludd@protonmail.ch License: MIT

LOKBOX is a recursive object value securing method which employs BLOWFISH encryption to secure JSON object contents. All elements of the object are encrypted/decrypted with exception of ID and Lock flags inside specific objects. For use with STAKK, SATRN RUDP telecommunications models.

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.

JSON is built on two structures:

A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.

Blowfish is a symmetric block cipher that can be used as a drop-in replacement for DES or IDEA. It takes a variable-length key, from 32 bits to 448 bits, making it ideal for both domestic and exportable use. Blowfish was designed in 1993 by Bruce Schneier as a fast, free alternative to existing encryption algorithms. Since then it has been analyzed considerably, and it is slowly gaining acceptance as a strong encryption algorithm. Blowfish is unpatented and license-free.

Exposed Functions

lokbox.isLocked(object);

lokbox.lock(object,key);

lokbox.unLock(object,key);

Usage Example


var lokbox = require('lokbox');

var ob = {
	test:"Hello",
	another:"Hello2",
	me:false,
	inside:{
		test:"Hello",
		another:"Hello2",
		me:false
	}
}

var encryptedOb = lokbox.lock(ob,"MySecretKey");

console.log("Is the object locked? "+lokbox.isLocked(encryptedOb));

var decryptedOb = lokbox.unlock(encryptedOb,"MySecretKey");

console.log("What is the value of 'test' in the unlocked object? "+decryptedOb.test);


Readme

Keywords

none

Package Sidebar

Install

npm i lokbox

Weekly Downloads

1

Version

0.1.3

License

MIT

Unpacked Size

25.5 kB

Total Files

4

Last publish

Collaborators

  • emanuelfludd