SubtleCrypto
Constructor
new SubtleCrypto()Methods
Overload 1 of 2
importKey(format: 'jwk', keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>Parameters
- format: 'jwk'
- keyData: JsonWebKey
- algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams
- extractable: boolean
- keyUsages: ReadonlyArray<KeyUsage>
Returns
Overload 2 of 2
importKey(format: Exclude<KeyFormat, 'jwk'>, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | HmacImportParams, extractable: boolean, keyUsages: Array<KeyUsage>): Promise<CryptoKey>Parameters
- format: Exclude<KeyFormat, 'jwk'>
- keyData: BufferSource
- algorithm: AlgorithmIdentifier | RsaHashedImportParams | HmacImportParams
- extractable: boolean
- keyUsages: Array<KeyUsage>
Returns
verify
View sourceverify(algorithm: AlgorithmIdentifier, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise<boolean>Parameters
- algorithm: AlgorithmIdentifier
- key: CryptoKey
- signature: BufferSource
- data: BufferSource
Returns
Promise<boolean>