Skip to main content
Module

std/crypto/mod.ts>WebCrypto

Deno standard library
Go to Latest
interface WebCrypto
import { type WebCrypto } from "https://deno.land/std@0.120.0/crypto/mod.ts";

Properties

optional
subtle: { encrypt?(
algorithm: WebCryptoAlgorithmIdentifier,
key: unknown,
): Promise<unknown>; decrypt?(
algorithm: WebCryptoAlgorithmIdentifier,
key: unknown,
): Promise<unknown>; sign?(
algorithm: WebCryptoAlgorithmIdentifier,
key: unknown,
): Promise<unknown>; verify?(
algorithm: WebCryptoAlgorithmIdentifier,
key: unknown,
signature: BufferSource,
): Promise<unknown>; digest?(algorithm: WebCryptoAlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>; generateKey?(
algorithm: WebCryptoAlgorithmIdentifier,
extractable: boolean,
keyUsages: string[],
): Promise<unknown>; deriveKey?(
algorithm: WebCryptoAlgorithmIdentifier,
baseKey: unknown,
derivedKeyType: string,
extractable: boolean,
keyUsages: string[],
): Promise<unknown>; deriveBits?(
algorithm: WebCryptoAlgorithmIdentifier,
baseKey: unknown,
length: number,
): Promise<unknown>; importKey?(
format: string,
keyData: BufferSource | unknown,
algorithm: WebCryptoAlgorithmIdentifier,
extractable: boolean,
keyUsages: string[],
): Promise<unknown>; exportKey?(format: string, key: unknown): Promise<unknown>; wrapKey?(
format: string,
key: unknown,
wrappingKey: unknown,
wrappingAlgorithm: WebCryptoAlgorithmIdentifier,
): Promise<unknown>; unwrapKey?(
format: string,
wrappedKey: BufferSource,
unwrappingKey: unknown,
unwrapAlgorithm: WebCryptoAlgorithmIdentifier,
unwrappedKeyAlgorithm: WebCryptoAlgorithmIdentifier,
extractable: boolean,
keyUsages: string[],
): Promise<unknown>; }

Methods

getRandomValues<T extends BufferSource>(buffer: T): T
optional
randomUUID(): string