🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

next-crypto

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-crypto

A simple encryption module for Next.JS edge runtime.

1.0.8
latest
Source
npm
Version published
Weekly downloads
960
-14.82%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

encrypt

FAQs

Package last updated on 03 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts