1.0.6 • Published 4 years ago
bitwrap v1.0.6
#bitwrap.js
##About bitwrap.js is a lightweight steganographic library for node.js and browser. It wraps data in random bits to make your data look useless and random.
##Examples
You can use stringWrap
for simple strings.
const bitwrap = require('bitwrap')
let a = bitwrap.stringWrap('Hello!')
let b = bitwrap.unWrapString(a)
console.log(a, '\n', b)
smartWrap
can be used for objects.
const bitwrap = require('bitwrap')
let Obj = {
foo: 'bar',
bar: () => 'foo',
hello: {
world: true
}
}
let a = bitwrap.smartWrap([Obj]) // Array can have multiple objects
let b = bitwrap.unWrapString(a)
console.log(a, '\n', JSON.stringify(b))
For more specific use you can use arrayWrap
to wrap single arrays of integers. Otherwise use smartWrap
const bitwrap = require('bitwrap')
let arr = [69, 420, 666, 1337]
let a = bitwrap.arrayWrap(arr)
let b = bitwrap.unWrap(a)
console.log(a, '\n', b)