@brixtol/cryptographer
Cryptographer with IV used for encryption and decryption of various data types with crypto. Uses an aes-256-gcm algorithm and supports multiple ciphers.
Why?
For encryption/decryption of sensitive data sent across the wire and processed within serverless functions. We opened sourced the package which is merely a wrapper for encryption/decryption with Crypto.
Install
pnpm add @brixtol/cryptographer
Usage
import { Cryptographer, md5 } from "@brixtol/cryptographer";
const crypto = Cryptographer(
secret: "secret"
, algorithm?: "aes-256-ctr"
, options?: CipherCCMOptions
);
crypto.encode({ foo: "bar" });
crypto.decode("12345678910abcdefghijkmnopqrstuvwxyz");
md5('hello world')
Ciphers
- aes-256-cbc
- aes-256-cbc-hmac-sha1
- aes-256-cbc-hmac-sha256
- aes-256-cfb
- aes-256-cfb1
- aes-256-cfb8
- aes-256-ctr
- aes-256-ofb
- aes256
- camellia256
License
Licensed under MIT
We ♡ open source!