MCPcopy Create free account
hub / github.com/awslabs/llrt / import

Function import

modules/llrt_crypto/src/subtle/key_algorithm.rs:317–335  ·  view source on GitHub ↗
(
        ctx: &Ctx<'js>,
        mode: KeyAlgorithmMode<'_, 'js>,
        algorithm_name: &str,
    )

Source from the content-addressed store, hash-verified

315pub enum KeyFormatData<'js> {
316 Jwk(Object<'js>),
317 Raw(ObjectBytes<'js>),
318 Spki(ObjectBytes<'js>),
319 Pkcs8(ObjectBytes<'js>),
320}
321
322#[derive(PartialEq)]
323pub enum KeyAlgorithmMode<'a, 'js> {
324 Import {
325 format: KeyFormatData<'js>,
326 kind: &'a mut KeyKind,
327 data: &'a mut Vec<u8>,
328 },
329 Generate,
330 Derive,
331}
332
333pub struct KeyAlgorithmWithUsages {
334 pub name: String,
335 pub algorithm: KeyAlgorithm,
336 pub public_usages: Vec<String>,
337 pub private_usages: Vec<String>,
338}

Callers 9

from_ed25519Function · 0.85
from_x25519Function · 0.85
from_aesFunction · 0.85
from_hmacFunction · 0.85
from_rsaFunction · 0.85
from_hkdfFunction · 0.85
from_pbkdf2Function · 0.85
requireFunction · 0.85
start_with_cfgFunction · 0.85

Calls 8

import_okp_keyFunction · 0.85
import_symmetric_keyFunction · 0.85
import_rsa_keyFunction · 0.85
import_derive_keyFunction · 0.85
get_requiredMethod · 0.80
or_throwMethod · 0.80
as_bytesMethod · 0.45

Tested by

no test coverage detected