@ende/crypto
ende add jsr:@ende/cryptoVersion 2026.10.15 on JSR.
Extensions to the Web Crypto supporting additional encryption APIs, but also delegating to the built-in APIs when possible.
import { crypto } from "@ende/crypto/crypto";
const message = "Hello, Deno!";
const encoder = new TextEncoder();
const data = encoder.encode(message);
await crypto.subtle.digest("BLAKE3", data);
Modules
@ende/crypto/aes-gcm— High-level AES-GCM authenticated encryption with automatic nonce generation.@ende/crypto/crypto— Extensions to the Web Crypto API supporting additional encryption APIs, but also delegating to the built-in APIs when possible.@ende/crypto/timing-safe-equal
Exports
AesGcmOptions— Options for encryptAesGcm and decryptAesGcm.crypto— A wrapper for WebCrypto which adds support for additional non-standard algorithms, but delegates to the runtime WebCrypto implementation whenever possible.decryptAesGcm— Decrypts data produced by encryptAesGcm.DIGEST_ALGORITHM_NAMES— All cryptographic hash/digest algorithms supported by std/crypto.DigestAlgorithm— Extended digest algorithms accepted by stdCrypto.subtle.digest.DigestAlgorithmName— An algorithm name supported by std/crypto.DigestAlgorithmObject— Extended digest algorithm objects.encryptAesGcm— Encrypts plaintext using AES-GCM with a random 96-bit nonce.StdCrypto— Extensions to the Web Crypto interface.StdSubtleCrypto— Extensions to the web standard `SubtleCrypto` interface.timingSafeEqual— When checking the values of cryptographic hashes are equal, default comparisons can be susceptible to timing based attacks, where attacker is able to find out information about the host system by repeatedly checking response times to equality comparisons of values.Uint8Array_— Proxy type of {@code Uint8Array<ArrayBuffer>} or {@code Uint8Array} in TypeScript 5.7 or below respectively.