# bun
bun i cripta
# pnpm
pnpm i cripta
# npm
npm i cripta
# yarn
yarn i criptaimport{cripta}from'cripta'constinstance=cripta({key: 'your-secret-key'})constencoded=instance.encode('hic sunt dracones')console.log('Encoded: ',encoded)console.log('Decoded: ',instance.decode(encoded))The Cripta can encrypt all primitive types: array, object, string, number, bigint, boolean, Symbol, undefined and null.
See an example of object encryption:
// encodingconstencoded=instance.encode({name: 'John Doe',email: 'john@example.com'})console.log('Encoded object: ',encoded)// retrieve the object from encoded valueconstdecoded=instance.decode(encoded)console.log('Decoded object: ',decoded)This package is licensed under the MIT license © Zunq