prod-wag-backend-automate-s.../node_modules/next-crypto
berkay c3b7556e7e added apps 2025-04-10 20:11:36 +03:00
..
.husky added apps 2025-04-10 20:11:36 +03:00
.eslintrc.json added apps 2025-04-10 20:11:36 +03:00
.prettierignore added apps 2025-04-10 20:11:36 +03:00
.prettierrc added apps 2025-04-10 20:11:36 +03:00
LICENSE added apps 2025-04-10 20:11:36 +03:00
README.md added apps 2025-04-10 20:11:36 +03:00
index.d.ts added apps 2025-04-10 20:11:36 +03:00
index.js added apps 2025-04-10 20:11:36 +03:00
package.json added apps 2025-04-10 20:11:36 +03:00

README.md

Next Crypto

Next Crypto uses aes-gcm encryption for encrypting and decrypting with Next.JS (created for running in edge runtime).

You can encrypt any sensitive data and store it where you need (session data in cookies, etc..).

You need only 1 required argument with your secret.

Works async by default.

Installation

Using NPM:

npm install next-crypto

Using Yarn:

yarn add next-crypto

Using Pnpm:

pnpm add next-crypto

Usage

import NextCrypto from 'next-crypto';

const crypto = new NextCrypto('secret key');

const encrypted = await crypto.encrypt('hello!');
const decrypted = await crypto.decrypt(encrypted);