import { type SubtleCrypto } from "https://deno.land/x/simplewebauthn@v11.0.0/packages/types/src/dom.ts";
This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto). Available only in secure contexts.
Methods
decrypt(): Promise<ArrayBuffer>
deriveBits(): Promise<ArrayBuffer>
digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>
encrypt(): Promise<ArrayBuffer>
exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>
generateKey(): Promise<CryptoKeyPair>
algorithm: RsaHashedKeyGenParams | EcKeyGenParams,
extractable: boolean,
keyUsages: ReadonlyArray<KeyUsage>,
generateKey(): Promise<CryptoKey>
algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params,
extractable: boolean,
keyUsages: ReadonlyArray<KeyUsage>,
generateKey(): Promise<CryptoKeyPair | CryptoKey>
importKey(): Promise<CryptoKey>
format: "jwk",
keyData: JsonWebKey,
algorithm: ,
extractable: boolean,
keyUsages: ReadonlyArray<KeyUsage>,
importKey(): Promise<CryptoKey>
format: Exclude<KeyFormat, "jwk">,
keyData: BufferSource,
algorithm: ,
extractable: boolean,
keyUsages: KeyUsage[],
unwrapKey(): Promise<CryptoKey>
format: KeyFormat,
wrappedKey: BufferSource,
unwrappingKey: CryptoKey,
unwrapAlgorithm: ,
unwrappedKeyAlgorithm: ,
extractable: boolean,
keyUsages: KeyUsage[],
verify(): Promise<boolean>
algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams,
key: CryptoKey,
signature: BufferSource,
data: BufferSource,