SubtleCrypto.importKey - Web documentation
method SubtleCrypto.importKey
SubtleCrypto.importKey(
format: "jwk",
keyData: JsonWebKey,
extractable: boolean,
keyUsages: KeyUsage[],
): Promise<CryptoKey>

Parameters

format: "jwk"
keyData: JsonWebKey
extractable: boolean
keyUsages: KeyUsage[]

Return Type

Promise<CryptoKey>
SubtleCrypto.importKey(
format: Exclude<KeyFormat, "jwk">,
keyData: BufferSource,
extractable: boolean,
keyUsages: KeyUsage[],
): Promise<CryptoKey>

Parameters

format: Exclude<KeyFormat, "jwk">
keyData: BufferSource
extractable: boolean
keyUsages: KeyUsage[]

Return Type

Promise<CryptoKey>