@tshirt/aes
v0.0.2
Published
Small encryption library used by T-shirt Ventures services and applications
Downloads
4
Readme
Package to encrypt & decrypt strings using
aes-256-gcm
.
Install
With yarn:
yarn add @tshirt/aes
With npm:
npm install @tshirt/aes
Usage
Don't use this package to encrypt your passwords, use hashing algorithms like argon2 or bcrypt instead.
import { encrypt, decrypt } from '@tshirt/aes';
const key = 'secureKey';
const encrypted = encrypt(key, 'foo'); // 4lxXNMY0dxjTLtP2i8KV3Fe770+yaEj3KnGUPdKKHn0pgXo=
const decrypted = decrypt(key, encrypted); // foo
Development
- Install dependencies using
yarn install
ornpm install
- Start development server using
yarn watch