Skip to content

Instantly share code, notes, and snippets.

View hieuntcasso's full-sized avatar
❄️
Funny

hieuntcasso

❄️
Funny
View GitHub Profile
@hieuntcasso
hieuntcasso / AesUtil.js
Created December 15, 2022 14:29 — forked from AndiDittrich/AesUtil.js
Node.js - AES Encryption/Decryption with AES-256-GCM using random Initialization Vector + Salt
// SPDX-License-Identifier: MPL-2.0
// AES Encryption/Decryption with AES-256-GCM using random Initialization Vector + Salt
// ----------------------------------------------------------------------------------------
// the encrypted datablock is base64 encoded for easy data exchange.
// if you have the option to store data binary save consider to remove the encoding to reduce storage size
// ----------------------------------------------------------------------------------------
// format of encrypted data - used by this example. not an official format
//
// +--------------------+-----------------------+----------------+----------------+