lokbox
v0.1.3
Published
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
Downloads
1
Readme
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: [email protected] 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);