https://github.com/namesmt/aes-gcm
Dead simple, modern, cross-platform AES-GCM encryption util package.
https://github.com/namesmt/aes-gcm
Last synced: over 1 year ago
JSON representation
Dead simple, modern, cross-platform AES-GCM encryption util package.
- Host: GitHub
- URL: https://github.com/namesmt/aes-gcm
- Owner: NamesMT
- License: mit
- Created: 2024-07-25T11:31:31.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-09T11:16:51.000Z (over 1 year ago)
- Last Synced: 2025-03-10T04:42:56.630Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 83 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @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.
## Features
- [x] TypeScript ready!
## Usage
### Install package:
```sh
# npm
npm install @namesmt/aes-gcm
# yarn
yarn add @namesmt/aes-gcm
# pnpm (recommended)
pnpm install @namesmt/aes-gcm
```
### Import:
```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)
```
## Roadmap
- [ ] Become the legendary 10000x developer
## License [![License][license-src]][license-href]
[MIT](./LICENSE) License © 2024 [NamesMT](https://github.com/NamesMT)
[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