enum ImportKeyAlgorithm {
Show 23 variants
RsassaPkcs1V1_5(RsaHashedImportParams),
RsaPss(RsaHashedImportParams),
RsaOaep(RsaHashedImportParams),
Ecdsa(EcKeyImportParams),
Ecdh(EcKeyImportParams),
Ed25519(Algorithm),
X25519(Algorithm),
Ed448(Algorithm),
X448(Algorithm),
AesCtr(Algorithm),
AesCbc(Algorithm),
AesGcm(Algorithm),
AesKw(Algorithm),
Hmac(HmacImportParams),
Hkdf(Algorithm),
Pbkdf2(Algorithm),
MlKem(Algorithm),
HybridKem(Algorithm),
MlDsa(Algorithm),
AesOcb(Algorithm),
ChaCha20Poly1305(Algorithm),
Kmac(KmacImportParams),
Argon2(Algorithm),
}Expand description
Normalized algorithm for the “importKey” operation, used as output of https://w3c.github.io/webcrypto/#dfn-normalize-an-algorithm
Variants§
RsassaPkcs1V1_5(RsaHashedImportParams)
RsaPss(RsaHashedImportParams)
RsaOaep(RsaHashedImportParams)
Ecdsa(EcKeyImportParams)
Ecdh(EcKeyImportParams)
Ed25519(Algorithm)
X25519(Algorithm)
Ed448(Algorithm)
X448(Algorithm)
AesCtr(Algorithm)
AesCbc(Algorithm)
AesGcm(Algorithm)
AesKw(Algorithm)
Hmac(HmacImportParams)
Hkdf(Algorithm)
Pbkdf2(Algorithm)
MlKem(Algorithm)
HybridKem(Algorithm)
MlDsa(Algorithm)
AesOcb(Algorithm)
ChaCha20Poly1305(Algorithm)
Kmac(KmacImportParams)
Argon2(Algorithm)
Implementations§
Source§impl ImportKeyAlgorithm
impl ImportKeyAlgorithm
fn import_key( &self, cx: &mut JSContext, global: &GlobalScope, format: KeyFormat, key_data: &[u8], extractable: bool, usages: Vec<KeyUsage>, ) -> Result<DomRoot<CryptoKey>, Error>
Sourcefn will_throw_for_key_data_length(&self, key_data_length: u32) -> bool
fn will_throw_for_key_data_length(&self, key_data_length: u32) -> bool
Return whether the import key operation specified by normalized algorithm would throw an error for every value of keyData that is a byte sequence whose length in bits is sharedKeyLength when format is “raw-secret”.
Trait Implementations§
Source§impl NormalizedAlgorithm for ImportKeyAlgorithm
impl NormalizedAlgorithm for ImportKeyAlgorithm
Source§fn from_object(
cx: &mut JSContext,
algorithm_name: CryptoAlgorithm,
object: HandleObject<'_>,
) -> Fallible<Self>
fn from_object( cx: &mut JSContext, algorithm_name: CryptoAlgorithm, object: HandleObject<'_>, ) -> Fallible<Self>
Source§fn name(&self) -> CryptoAlgorithm
fn name(&self) -> CryptoAlgorithm
Return the name of the normalized algorithm.
Auto Trait Implementations§
impl Freeze for ImportKeyAlgorithm
impl RefUnwindSafe for ImportKeyAlgorithm
impl Send for ImportKeyAlgorithm
impl Sync for ImportKeyAlgorithm
impl Unpin for ImportKeyAlgorithm
impl UnsafeUnpin for ImportKeyAlgorithm
impl UnwindSafe for ImportKeyAlgorithm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert