@uncrypt/simple-aes
v0.3.0
Published
Simple aes crypto routines
Downloads
2
Readme
@uncrypt/simple-aes
Install
npm install @uncrypt/simple-aes # via npm
yarn add @uncrypt/simple-aes # via yarn
pnpm add @uncrypt/simple-aes # via pnpm
Usage
import {
AesCbcEncryptor,
DecryptError,
WeakPasswordError,
} from "@uncrypt/simple-aes";
const key = "long-enough-secret-encryption-key";
const data = "something-utf8-é😀";
const aesCrypt = new AesCbcEncryptor(key); // will throw WeakPasswordError if too short
const crypted = aesCrypt.encrypt(data);
aesCrypt.decrypt(crypted); // will throw Decrypt error if iv not valid or wrong key
Support
Don't hesitate and open an issue.
Sponsors
If my OSS work brightens your day, let's take it to new heights together! Sponsor, coffee, or star – any gesture of support fuels my passion to improve. Thanks for being awesome! 🙏❤️
Special thanks to
License
MIT © belgattitude and contributors.