@namesmt/aes-gcm
v1.1.1
Published
Dead simple cross-platform AES-GCM encryption util package.
Maintainers
Readme
@namesmt/aes-gcm 
@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:
# npm
npm install @namesmt/aes-gcm
# yarn
yarn add @namesmt/aes-gcm
# pnpm (recommended)
pnpm install @namesmt/aes-gcmImport:
// 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)Releasing
Releases are version-first and dispatched by hand: one workflow run does the whole release,
so a git push on its own never publishes anything.
- Go to Actions → Release → Run workflow and give it the version to ship, e.g.
1.2.0. .github/workflows/release.ymlverifies the version, runspnpm run checkandpnpm run build, then lets changelogen write the changelog, bumppackage.json, commit and tagv<version>. It pushes that commit and tag, creates the GitHub release, and publishes to npm with a short-lived OIDC token and--provenance.
Tick dry-run to do everything up to the commit and stop there — nothing is written back.
Locally, pnpm run release:check <version> validates a version against package.json, and
pnpm run release:preview prints the changelog the next release would get.
One-time setup: publish the package once by hand (npm only offers a trusted publisher for a
package that already exists), then on npmjs.com enable Settings → Publishing access → Trusted
Publishing for NamesMT/aes-gcm with the workflow filename release.yml.
Roadmap
- [ ] Become the legendary 10000x developer
