Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
interface StdSubtleCrypto
implements SubtleCrypto
import { type StdSubtleCrypto } from "https://deno.land/std@0.190.0/crypto/crypto.ts";

Extensions to the web standard SubtleCrypto interface.

Methods

digest(algorithm: DigestAlgorithm, data: BufferSource | AsyncIterable<BufferSource> | Iterable<BufferSource>): Promise<ArrayBuffer>

Returns a new Promise object that will digest data using the specified AlgorithmIdentifier.

digestSync(algorithm: DigestAlgorithm, data: BufferSource | Iterable<BufferSource>): ArrayBuffer

Returns a ArrayBuffer with the result of digesting data using the specified AlgorithmIdentifier.

timingSafeEqual(a: ArrayBufferLike | DataView, b: ArrayBufferLike | DataView): boolean

Compare to array buffers or data views in a way that timing based attacks cannot gain information about the platform.