importKey method
The importKey()
method of the SubtleCrypto
interface imports a key: that is, it takes as input a key in an external,
portable
format and gives you a CryptoKey object that you can use in the
Web Crypto API.
The function accepts several import formats: see Supported formats for details.
Implementation
external JSPromise<CryptoKey> importKey(
KeyFormat format,
JSObject keyData,
AlgorithmIdentifier algorithm,
bool extractable,
JSArray<JSString> keyUsages,
);