pub struct DecapsulationKey { /* private fields */ }
Expand description
X-Wing decapsulation key or private key.
Implementations§
Source§impl DecapsulationKey
impl DecapsulationKey
Sourcepub fn generate_from_os_rng() -> DecapsulationKey
Available on crate feature getrandom
only.
pub fn generate_from_os_rng() -> DecapsulationKey
getrandom
only.Generate a new DecapsulationKey
using OsRng
.
Sourcepub fn generate(rng: &mut impl CryptoRngCore) -> DecapsulationKey
pub fn generate(rng: &mut impl CryptoRngCore) -> DecapsulationKey
Generate a new DecapsulationKey
using the provided RNG.
Sourcepub fn encapsulation_key(&self) -> EncapsulationKey
pub fn encapsulation_key(&self) -> EncapsulationKey
Provide the matching EncapsulationKey
.
Trait Implementations§
Source§impl Clone for DecapsulationKey
impl Clone for DecapsulationKey
Source§fn clone(&self) -> DecapsulationKey
fn clone(&self) -> DecapsulationKey
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Decapsulate<Ciphertext, [u8; 32]> for DecapsulationKey
impl Decapsulate<Ciphertext, [u8; 32]> for DecapsulationKey
Source§type Error = Infallible
type Error = Infallible
Decapsulation error
Source§fn decapsulate(&self, ct: &Ciphertext) -> Result<SharedSecret, Self::Error>
fn decapsulate(&self, ct: &Ciphertext) -> Result<SharedSecret, Self::Error>
Decapsulates the given encapsulated key
Source§impl Drop for DecapsulationKey
impl Drop for DecapsulationKey
Auto Trait Implementations§
impl Freeze for DecapsulationKey
impl RefUnwindSafe for DecapsulationKey
impl Send for DecapsulationKey
impl Sync for DecapsulationKey
impl Unpin for DecapsulationKey
impl UnwindSafe for DecapsulationKey
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