pub struct EncapsulationKey { /* private fields */ }Expand description
X-Wing encapsulation or public key.
Trait Implementations§
Source§impl Clone for EncapsulationKey
impl Clone for EncapsulationKey
Source§fn clone(&self) -> EncapsulationKey
fn clone(&self) -> EncapsulationKey
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 Encapsulate for EncapsulationKey
impl Encapsulate for EncapsulationKey
Source§fn encapsulate_with_rng<R: TryCryptoRng + ?Sized>(
&self,
rng: &mut R,
) -> Result<(Ciphertext, SharedSecret), R::Error>
fn encapsulate_with_rng<R: TryCryptoRng + ?Sized>( &self, rng: &mut R, ) -> Result<(Ciphertext, SharedSecret), R::Error>
Encapsulates a fresh
SharedSecret generated using the supplied random number
generator R.Source§fn encapsulate(
&self,
) -> (Array<u8, Self::CiphertextSize>, Array<u8, Self::SharedSecretSize>)
fn encapsulate( &self, ) -> (Array<u8, Self::CiphertextSize>, Array<u8, Self::SharedSecretSize>)
Available on crate feature
getrandom only.Encapsulate a fresh shared secret generated using the system’s secure RNG.
Source§impl KemParams for EncapsulationKey
impl KemParams for EncapsulationKey
Source§type CiphertextSize = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B1>, B1>, B0>, B0>, B0>, B0>, B0>
type CiphertextSize = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B1>, B1>, B0>, B0>, B0>, B0>, B0>
Size of the ciphertext (a.k.a. “encapsulated key”) produced by
Encapsulate::encapsulate.Size of the shared secret after decapsulation by
Decapsulate::decapsulate.Source§impl KeyExport for EncapsulationKey
impl KeyExport for EncapsulationKey
Source§impl KeySizeUser for EncapsulationKey
impl KeySizeUser for EncapsulationKey
Source§impl PartialEq for EncapsulationKey
impl PartialEq for EncapsulationKey
Source§impl TryFrom<&[u8]> for EncapsulationKey
impl TryFrom<&[u8]> for EncapsulationKey
Source§type Error = InvalidKey
type Error = InvalidKey
The type returned in the event of a conversion error.
Source§impl TryKeyInit for EncapsulationKey
impl TryKeyInit for EncapsulationKey
Source§fn new(key_bytes: &Key<Self>) -> Result<Self, InvalidKey>
fn new(key_bytes: &Key<Self>) -> Result<Self, InvalidKey>
Create new value from a fixed-size key. Read more
Source§fn new_from_slice(key: &[u8]) -> Result<Self, InvalidKey>
fn new_from_slice(key: &[u8]) -> Result<Self, InvalidKey>
Create new value from a variable size key. Read more
impl Eq for EncapsulationKey
impl StructuralPartialEq for EncapsulationKey
Auto Trait Implementations§
impl Freeze for EncapsulationKey
impl RefUnwindSafe for EncapsulationKey
impl Send for EncapsulationKey
impl Sync for EncapsulationKey
impl Unpin for EncapsulationKey
impl UnwindSafe for EncapsulationKey
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