Skip to main content
SubtleCrypto.importKey - Crypto - Web documentation
method SubtleCrypto.importKey
Private
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>