Struct classic_mceliece_rust::ClassicMcEliece
source · [−]pub struct ClassicMcEliece;
Available on crate feature
kem
only.Expand description
A struct for encapsulating a shared key using Classic McEliece.
Trait Implementations
sourceimpl Debug for ClassicMcEliece
impl Debug for ClassicMcEliece
sourceimpl Encapsulator<Ciphertext> for ClassicMcEliece
impl Encapsulator<Ciphertext> for ClassicMcEliece
sourcefn try_encap<R: CryptoRng + RngCore>(
&self,
csprng: &mut R,
recip_pubkey: &<Ciphertext as EncappedKey>::RecipientPublicKey
) -> Result<(Ciphertext, SharedSecret<Ciphertext>), Error>
fn try_encap<R: CryptoRng + RngCore>(
&self,
csprng: &mut R,
recip_pubkey: &<Ciphertext as EncappedKey>::RecipientPublicKey
) -> Result<(Ciphertext, SharedSecret<Ciphertext>), Error>
Attempts to encapsulate a fresh shared secret with the given recipient. The resulting
shared secret is bound to the identity encoded in Self
(i.e., authenticated wrt Self
).
If Self
is empty, then this is equivalent to unauthenticated encapsulation. Returns the
shared secret and encapsulated key on success, or an error if something went wrong. Read more
Auto Trait Implementations
impl RefUnwindSafe for ClassicMcEliece
impl Send for ClassicMcEliece
impl Sync for ClassicMcEliece
impl Unpin for ClassicMcEliece
impl UnwindSafe for ClassicMcEliece
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more