New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

crypto-aes-gcm

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crypto-aes-gcm

Uses the SubtleCrypto interface of the Web Cryptography API to encrypt and decrypt text using AES-GCM (AES Galois counter mode)

1.1.0
Source
npm
Version published
Maintainers
1
Created
Source

crypto-aes-gcm

Uses the SubtleCrypto interface of the Web Cryptography API to encrypt and decrypt text using AES-GCM (AES Galois counter mode).

This module uses the native (web)crypto API in node.js and the browser.

npm install crypto-aes-gcm
import { aesGcmEncrypt, aesGcmDecrypt } from 'crypto-aes-gcm';

// encryption
const ciphertext = await aesGcmEncrypt('my secret text', 'pw');
aesGcmEncrypt('my secret text', 'pw').then(function(ciphertext) { console.log(ciphertext); });

// decryption
const plaintext = await aesGcmDecrypt(ciphertext, 'pw');
aesGcmDecrypt(ciphertext, 'pw').then(function(plaintext) { console.log(plaintext); });

Origin story

The code was originally written by Chris Veness at this gist.

Then, it was published as a package with node.js compatability out of the box.

FAQs

Package last updated on 14 Jan 2022

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