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).
Methods
generateKey(): Promise<CryptoKeyPair>
generateKey(): Promise<CryptoKey>
generateKey(): Promise<CryptoKeyPair | CryptoKey>
importKey(): Promise<CryptoKey>
format: "jwk",
keyData: JsonWebKey,
algorithm: AlgorithmIdentifier | HmacImportParams,
extractable: boolean,
keyUsages: KeyUsage[],
importKey(): Promise<CryptoKey>
format: Exclude<KeyFormat, "jwk">,
keyData: BufferSource,
algorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams,
extractable: boolean,
keyUsages: KeyUsage[],
exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>
verify(): Promise<boolean>
algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams,
key: CryptoKey,
signature: BufferSource,
data: BufferSource,
digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>
deriveBits(): Promise<ArrayBuffer>
deriveKey(): Promise<CryptoKey>
algorithm: AlgorithmIdentifier | HkdfParams | Pbkdf2Params,
baseKey: CryptoKey,
derivedKeyType: ,
extractable: boolean,
keyUsages: KeyUsage[],
wrapKey(): Promise<ArrayBuffer>
format: KeyFormat,
key: CryptoKey,
wrappingKey: CryptoKey,
wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams,
type
{ prototype: SubtleCrypto; new (): SubtleCrypto; }