SubtleCrypto

Classin globals@fastly/js-compute 4.0.0View source

Constructor

new SubtleCrypto()

Methods

Parameters

algorithm: AlgorithmIdentifier
data: BufferSource

Returns

importKey

Overload 1 of 2

importKey(format: 'jwk', keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>
View source

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>
View source

Parameters

format: Exclude<KeyFormat, 'jwk'>
keyData: BufferSource
algorithm: AlgorithmIdentifier | RsaHashedImportParams | HmacImportParams
extractable: boolean
keyUsages: Array<KeyUsage>

Returns

verify(algorithm: AlgorithmIdentifier, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise<boolean>

Parameters

algorithm: AlgorithmIdentifier
key: CryptoKey
signature: BufferSource
data: BufferSource

Returns

Promise<boolean>