Skip to content

About

Encrypt and decrypt text using AES-GCM

Topics

Resources

Stars

12 stars

Watchers

1 watching

Forks

Latest commit

 

History

19 Commits

Folders and files

Repository files navigation

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 WebCrypto API in node.js, Deno and the browser.

Node and browser: crypto-aes-gcm

Deno package: https://deno.land/x/crypto_aes_gcm

import { aes_gcm_encrypt, aes_gcm_decrypt } from 'crypto-aes-gcm';
const password = '123456';
const message = 'i will never let you go';

const encrypted = await aes_gcm_encrypt(message, password);
console.log(encrypted);

const decrypted = await aes_gcm_decrypt(encrypted, password);
console.log(decrypted);

console.log(message === decrypted);

Original implementation

The code was originally written by Chris Veness.

About

Encrypt and decrypt text using AES-GCM

Topics

Resources

Stars

12 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages