pub struct EncapsulationKey<P>where
P: KemParams,{ /* private fields */ }Expand description
An EncapsulationKey provides the ability to encapsulate a shared key so that it can only be
decapsulated by the holder of the corresponding decapsulation key.
Trait Implementations§
Source§impl<P> AssociatedAlgorithmIdentifier for EncapsulationKey<P>where
P: KemParams + AssociatedAlgorithmIdentifier<Params = AnyRef<'static>>,
Available on crate feature pkcs8 only.
impl<P> AssociatedAlgorithmIdentifier for EncapsulationKey<P>where
P: KemParams + AssociatedAlgorithmIdentifier<Params = AnyRef<'static>>,
Available on crate feature
pkcs8 only.Source§const ALGORITHM_IDENTIFIER: AlgorithmIdentifier<Self::Params> = P::ALGORITHM_IDENTIFIER
const ALGORITHM_IDENTIFIER: AlgorithmIdentifier<Self::Params> = P::ALGORITHM_IDENTIFIER
AlgorithmIdentifier for this structure.Source§type Params = <P as AssociatedAlgorithmIdentifier>::Params
type Params = <P as AssociatedAlgorithmIdentifier>::Params
Algorithm parameters.
Source§impl<P> Clone for EncapsulationKey<P>where
P: KemParams + Clone,
impl<P> Clone for EncapsulationKey<P>where
P: KemParams + Clone,
Source§fn clone(&self) -> EncapsulationKey<P>
fn clone(&self) -> EncapsulationKey<P>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<P> Debug for EncapsulationKey<P>where
P: KemParams + Debug,
impl<P> Debug for EncapsulationKey<P>where
P: KemParams + Debug,
Source§impl<P> Encapsulate<Array<u8, <P as PkeParams>::CiphertextSize>, Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for EncapsulationKey<P>where
P: KemParams,
impl<P> Encapsulate<Array<u8, <P as PkeParams>::CiphertextSize>, Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for EncapsulationKey<P>where
P: KemParams,
Source§type Error = Infallible
type Error = Infallible
Encapsulation error
Source§impl<P> EncapsulateDeterministic<Array<u8, <P as PkeParams>::CiphertextSize>, Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for EncapsulationKey<P>where
P: KemParams,
Available on crate feature deterministic only.
impl<P> EncapsulateDeterministic<Array<u8, <P as PkeParams>::CiphertextSize>, Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for EncapsulationKey<P>where
P: KemParams,
Available on crate feature
deterministic only.Source§impl<P> EncodePublicKey for EncapsulationKey<P>where
P: KemParams + AssociatedAlgorithmIdentifier<Params = AnyRef<'static>>,
Available on crate features pkcs8 and alloc only.
impl<P> EncodePublicKey for EncapsulationKey<P>where
P: KemParams + AssociatedAlgorithmIdentifier<Params = AnyRef<'static>>,
Available on crate features
pkcs8 and alloc only.Source§fn to_public_key_der(&self) -> Result<Document>
fn to_public_key_der(&self) -> Result<Document>
Serialize the given EncapsulationKey into DER format.
Returns a Document which wraps the DER document in case of success.
Source§fn to_public_key_pem(&self, line_ending: LineEnding) -> Result<String, Error>
fn to_public_key_pem(&self, line_ending: LineEnding) -> Result<String, Error>
Serialize this public key as PEM-encoded SPKI with the given
LineEnding.Source§impl<P> EncodedSizeUser for EncapsulationKey<P>where
P: KemParams,
impl<P> EncodedSizeUser for EncapsulationKey<P>where
P: KemParams,
Source§impl<P> PartialEq for EncapsulationKey<P>where
P: KemParams + PartialEq,
impl<P> PartialEq for EncapsulationKey<P>where
P: KemParams + PartialEq,
Source§impl<P> TryFrom<SubjectPublicKeyInfo<AnyRef<'_>, BitStringRef<'_>>> for EncapsulationKey<P>where
P: KemParams + AssociatedAlgorithmIdentifier<Params = AnyRef<'static>>,
Available on crate feature pkcs8 only.
impl<P> TryFrom<SubjectPublicKeyInfo<AnyRef<'_>, BitStringRef<'_>>> for EncapsulationKey<P>where
P: KemParams + AssociatedAlgorithmIdentifier<Params = AnyRef<'static>>,
Available on crate feature
pkcs8 only.impl<P> StructuralPartialEq for EncapsulationKey<P>where
P: KemParams,
Auto Trait Implementations§
impl<P> Freeze for EncapsulationKey<P>
impl<P> RefUnwindSafe for EncapsulationKey<P>
impl<P> Send for EncapsulationKey<P>
impl<P> Sync for EncapsulationKey<P>
impl<P> Unpin for EncapsulationKey<P>
impl<P> UnwindSafe for EncapsulationKey<P>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DecodePublicKey for T
impl<T> DecodePublicKey for T
Source§impl<T> DynAssociatedAlgorithmIdentifier for Twhere
T: AssociatedAlgorithmIdentifier,
impl<T> DynAssociatedAlgorithmIdentifier for Twhere
T: AssociatedAlgorithmIdentifier,
Source§fn algorithm_identifier(&self) -> Result<AlgorithmIdentifier<Any>, Error>
fn algorithm_identifier(&self) -> Result<AlgorithmIdentifier<Any>, Error>
AlgorithmIdentifier for this structure.