more of an example, not recommended for production use
const iv = new IvCrypto({
algorithm: "aes128",
encoding: "base64",
key: "1234567891012345"
})
const text = "Sit amet marshmallow muffin topping."
const enc = iv.encrypt(text)
console.log(`encrypted: ${enc}`)
console.log(`decrypted: ${iv.decrypt(enc)}`)
Supplying cli: true
when creating class instance will enable an interactive command line.
const iv = new IvCrypto({
cli: true,
algorithm: "aes128",
encoding: "base64",
key: "1234567891012345"
})
Clone or download
git clone https://github.com/RyLeeHarrison/iv-crypto
cd iv-crypto-master
example for command line
npm run cli
example for general usage
npm run general