Data encryption and decryption for rotating credentials and algorithms.
(Inspired by keygrip and this PR).
npm install keycrypt --save
import { Keycrypt } from 'keycrypt'
const secrets = [Buffer.from('secret', 'utf8')]
const keycrypt = new Keycrypt(secrets)
const raw = Buffer.from('some data', 'utf8')
const encrypted = keycrypt.encode(raw)
const decrypted = keycrypt.decode(encrypted)
assert.equal(decrypted, raw)
This project is using TypeScript and publishes the definitions to NPM.
Apache 2.0