Skip to main content

import_key

Function import_key 

Source
pub(crate) fn import_key(
    ec_algorithm: EcAlgorithm,
    cx: &mut JSContext,
    global: &GlobalScope,
    normalized_algorithm: &SubtleEcKeyImportParams,
    format: KeyFormat,
    key_data: &[u8],
    extractable: bool,
    usages: Vec<KeyUsage>,
) -> Result<DomRoot<CryptoKey>, Error>
Expand description

https://w3c.github.io/webcrypto/#ecdsa-operations-import-key https://w3c.github.io/webcrypto/#ecdh-operations-import-key

This implementation is based on the specification of the importKey operation of ECDSA. When format is “jwk”, Step 2.2 and Step 2.3 in the specification of the importKey operation of ECDH are combined into a single step, and Step 2.9.1 to Step 2.9.3. here are skipped for ECDH.