Skip to content

SubtleCrypto

Values

decrypt

let decrypt: (
WebAPI.WebCryptoAPI.subtleCrypto,
~algorithm: WebAPI.WebCryptoAPI.algorithmIdentifier,
~key: WebAPI.WebCryptoAPI.cryptoKey,
~data: WebAPI.Prelude.bufferSource,
) => Promise.t<ArrayBuffer.t>

deriveBits

let deriveBits: (
WebAPI.WebCryptoAPI.subtleCrypto,
~algorithm: WebAPI.WebCryptoAPI.algorithm,
~baseKey: WebAPI.WebCryptoAPI.cryptoKey,
~length: int=?,
) => Promise.t<ArrayBuffer.t>

Parameters

WebAPI.WebCryptoAPI.subtleCrypto WebAPI.WebCryptoAPI.algorithm WebAPI.WebCryptoAPI.cryptoKey option< int >

Return type

Promise.t< ArrayBuffer.t >

deriveBits2

let deriveBits2: (
WebAPI.WebCryptoAPI.subtleCrypto,
~algorithm: string,
~baseKey: WebAPI.WebCryptoAPI.cryptoKey,
~length: int=?,
) => Promise.t<ArrayBuffer.t>

Parameters

WebAPI.WebCryptoAPI.subtleCrypto string WebAPI.WebCryptoAPI.cryptoKey option< int >

Return type

Promise.t< ArrayBuffer.t >

deriveKey

let deriveKey: (
WebAPI.WebCryptoAPI.subtleCrypto,
~algorithm: WebAPI.WebCryptoAPI.algorithmIdentifier,
~baseKey: WebAPI.WebCryptoAPI.cryptoKey,
~derivedKeyType: WebAPI.WebCryptoAPI.algorithmIdentifier,
~extractable: bool,
~keyUsages: array<WebAPI.WebCryptoAPI.keyUsage>,
) => Promise.t<JSON.t>

digest

let digest: (
WebAPI.WebCryptoAPI.subtleCrypto,
~algorithm: WebAPI.WebCryptoAPI.algorithmIdentifier,
~data: WebAPI.Prelude.bufferSource,
) => Promise.t<JSON.t>

encrypt

let encrypt: (
WebAPI.WebCryptoAPI.subtleCrypto,
~algorithm: WebAPI.WebCryptoAPI.algorithmIdentifier,
~key: WebAPI.WebCryptoAPI.cryptoKey,
~data: WebAPI.Prelude.bufferSource,
) => Promise.t<ArrayBuffer.t>

exportKey

let exportKey: (
WebAPI.WebCryptoAPI.subtleCrypto,
~format: WebAPI.WebCryptoAPI.keyFormat,
~key: WebAPI.WebCryptoAPI.cryptoKey,
) => Promise.t<JSON.t>

generateKey

let generateKey: (
WebAPI.WebCryptoAPI.subtleCrypto,
~algorithm: WebAPI.WebCryptoAPI.algorithm,
~extractable: bool,
~keyUsages: array<WebAPI.WebCryptoAPI.keyUsage>,
) => Promise.t<JSON.t>

Parameters

WebAPI.WebCryptoAPI.subtleCrypto WebAPI.WebCryptoAPI.algorithm bool array< WebAPI.WebCryptoAPI.keyUsage >

Return type

Promise.t< JSON.t >

generateKey2

let generateKey2: (
WebAPI.WebCryptoAPI.subtleCrypto,
~algorithm: string,
~extractable: bool,
~keyUsages: array<WebAPI.WebCryptoAPI.keyUsage>,
) => Promise.t<JSON.t>

Parameters

WebAPI.WebCryptoAPI.subtleCrypto string bool array< WebAPI.WebCryptoAPI.keyUsage >

Return type

Promise.t< JSON.t >

importKey

let importKey: (
WebAPI.WebCryptoAPI.subtleCrypto,
~format: WebAPI.Prelude.any,
~keyData: WebAPI.Prelude.bufferSource,
~algorithm: WebAPI.WebCryptoAPI.algorithmIdentifier,
~extractable: bool,
~keyUsages: array<WebAPI.WebCryptoAPI.keyUsage>,
) => Promise.t<WebAPI.WebCryptoAPI.cryptoKey>

sign

let sign: (
WebAPI.WebCryptoAPI.subtleCrypto,
~algorithm: WebAPI.WebCryptoAPI.algorithmIdentifier,
~key: WebAPI.WebCryptoAPI.cryptoKey,
~data: WebAPI.Prelude.bufferSource,
) => Promise.t<JSON.t>

unwrapKey

let unwrapKey: (
WebAPI.WebCryptoAPI.subtleCrypto,
~format: WebAPI.WebCryptoAPI.keyFormat,
~wrappedKey: WebAPI.Prelude.bufferSource,
~unwrappingKey: WebAPI.WebCryptoAPI.cryptoKey,
~unwrapAlgorithm: WebAPI.WebCryptoAPI.algorithmIdentifier,
~unwrappedKeyAlgorithm: WebAPI.WebCryptoAPI.algorithmIdentifier,
~extractable: bool,
~keyUsages: array<WebAPI.WebCryptoAPI.keyUsage>,
) => Promise.t<WebAPI.WebCryptoAPI.cryptoKey>

verify

let verify: (
WebAPI.WebCryptoAPI.subtleCrypto,
~algorithm: WebAPI.WebCryptoAPI.algorithmIdentifier,
~key: WebAPI.WebCryptoAPI.cryptoKey,
~signature: WebAPI.Prelude.bufferSource,
~data: WebAPI.Prelude.bufferSource,
) => Promise.t<JSON.t>

wrapKey

let wrapKey: (
WebAPI.WebCryptoAPI.subtleCrypto,
~format: WebAPI.WebCryptoAPI.keyFormat,
~key: WebAPI.WebCryptoAPI.cryptoKey,
~wrappingKey: WebAPI.WebCryptoAPI.cryptoKey,
~wrapAlgorithm: WebAPI.WebCryptoAPI.algorithm,
) => Promise.t<JSON.t>

wrapKey2

let wrapKey2: (
WebAPI.WebCryptoAPI.subtleCrypto,
~format: WebAPI.WebCryptoAPI.keyFormat,
~key: WebAPI.WebCryptoAPI.cryptoKey,
~wrappingKey: WebAPI.WebCryptoAPI.cryptoKey,
~wrapAlgorithm: string,
) => Promise.t<JSON.t>