1.0.8 • Published 7 months ago

next-crypto v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

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);
1.0.8

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.1

7 months ago