Skip to main content
Module

x/simple_utility/src/crypto.ts

A handy utility collection.
Go to Latest
import * as simpleUtility from "https://deno.land/x/simple_utility@v0.0.6/src/crypto.ts";

Functions

Decrypt encrypted byte array using AES-GCM with 256 bits key 128 bits tag and 96 bits IV. Read the IV prepended to the byte array.

Encrypt byte array using AES-GCM with 256 bits key, 128 bits tag and 96 bits IV. The IV is prepended to the byte array.

Generate and export public/private key pair as a portable byte array.

Derive SHA2 hash value from byte array.

Create byte array signature using the private key and SHA384 hash algorithm.

Verifies the correct signature of a byte array using the public key and SHA384 hash algorithm.

Type Aliases

Means the byte array after exporting CryptoKey.

Each is PortableCryptoKey public/private key pair.