Dead simple cross-platform AES-GCM encryption util package.
npm install @namesmt/aes-gcm[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![Codecov][codecov-src]][codecov-href]
[![Bundlejs][bundlejs-src]][bundlejs-href]
[![jsDocs.io][jsDocs-src]][jsDocs-href]
@namesmt/aes-gcm is a dead simple cross-platform AES-GCM encryption util package.
Note: The result of encrypt function is the string of base64 encoded IV and ciphertext, concatenated with a separator.
sh
npm
npm install @namesmt/aes-gcmyarn
yarn add @namesmt/aes-gcmpnpm (recommended)
pnpm install @namesmt/aes-gcm
`$3
`ts
// ESM
import { decrypt, encrypt } from '@namesmt/aes-gcm'const plaintext = 'Hello, world!'
const password = 'pw'
const encrypted = await encrypt(plaintext, password)
const decrypted = await decrypt(encrypted, password)
``- [ ] Become the legendary 10000x developer
[npm-version-src]: https://img.shields.io/npm/v/@namesmt/aes-gcm?labelColor=18181B&color=F0DB4F
[npm-version-href]: https://npmjs.com/package/@namesmt/aes-gcm
[npm-downloads-src]: https://img.shields.io/npm/dm/@namesmt/aes-gcm?labelColor=18181B&color=F0DB4F
[npm-downloads-href]: https://npmjs.com/package/@namesmt/aes-gcm
[codecov-src]: https://img.shields.io/codecov/c/gh/namesmt/aes-gcm/main?labelColor=18181B&color=F0DB4F
[codecov-href]: https://codecov.io/gh/namesmt/aes-gcm
[license-src]: https://img.shields.io/github/license/namesmt/aes-gcm.svg?labelColor=18181B&color=F0DB4F
[license-href]: https://github.com/namesmt/aes-gcm/blob/main/LICENSE
[bundlejs-src]: https://img.shields.io/bundlejs/size/@namesmt/aes-gcm?labelColor=18181B&color=F0DB4F
[bundlejs-href]: https://bundlejs.com/?q=@namesmt/aes-gcm
[jsDocs-src]: https://img.shields.io/badge/Check_out-jsDocs.io---?labelColor=18181B&color=F0DB4F
[jsDocs-href]: https://www.jsdocs.io/package/@namesmt/aes-gcm