Skip to main content
Module

std/crypto/mod.ts

Deno standard library
Go to Latest
import * as mod from "https://deno.land/std@0.165.0/crypto/mod.ts";

Extensions to the Web Crypto supporting additional encryption APIs.

Provides additional digest algorithms that are not part of the WebCrypto standard as well as a subtle.digest and subtle.digestSync methods. It also provide a subtle.timingSafeEqual() method to compare array buffers or data views in a way that isn't prone to timing based attacks.

The "polyfill" delegates to WebCrypto where possible.

The KeyStack export implements the KeyRing interface for managing rotatable keys for signing data to prevent tampering, like with HTTP cookies.

Classes

A cryptographic key chain which allows signing of data to prevent tampering, but also allows for easy key rotation without needing to re-sign the data.

Variables

An wrapper for WebCrypto adding support for additional non-standard algorithms, but delegating to the runtime WebCrypto implementation whenever possible.

Functions

Converts a hash to a string with a given encoding.

Interfaces

Extensions to the Web Crypto interface.

Extensions to the web standard SubtleCrypto interface.

Type Aliases

Types of data that can be signed cryptographically.

Types of keys that can be used to sign data.