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.
class
SubtleCrypto
class SubtleCrypto
- algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,data: BufferSource
- algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params,length?: null | number
- algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params,derivedKeyType: AlgorithmIdentifier | HkdfParams | Pbkdf2Params | AesDerivedKeyParams | HmacImportParams,extractable: boolean,keyUsages: KeyUsage[]algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params,derivedKeyType: AlgorithmIdentifier | HkdfParams | Pbkdf2Params | AesDerivedKeyParams | HmacImportParams,extractable: boolean,keyUsages: Iterable<KeyUsage>
- algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,data: BufferSource
- algorithm: 'Ed25519' | { name: 'Ed25519' },extractable: boolean,keyUsages: readonly 'sign' | 'verify'[]): Promise<CryptoKeyPair>;algorithm: RsaHashedKeyGenParams | EcKeyGenParams,extractable: boolean,keyUsages: readonly KeyUsage[]): Promise<CryptoKeyPair>;algorithm: Pbkdf2Params | AesKeyGenParams | HmacKeyGenParams,extractable: boolean,keyUsages: readonly KeyUsage[]algorithm: AlgorithmIdentifier,extractable: boolean,keyUsages: KeyUsage[]algorithm: AlgorithmIdentifier,extractable: boolean,keyUsages: Iterable<KeyUsage>
- format: 'jwk',keyData: JsonWebKey,algorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams | EcKeyImportParams | AesKeyAlgorithm,extractable: boolean,keyUsages: readonly KeyUsage[]
- format: KeyFormat,wrappedKey: BufferSource,unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,unwrappedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams | EcKeyImportParams | AesKeyAlgorithm,extractable: boolean,keyUsages: KeyUsage[]format: KeyFormat,wrappedKey: BufferSource,unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,unwrappedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams | EcKeyImportParams | AesKeyAlgorithm,extractable: boolean,keyUsages: Iterable<KeyUsage>
- algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams,signature: BufferSource,data: BufferSource): Promise<boolean>;
- format: KeyFormat,wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams