Enum sequoia_openpgp::crypto::mpi::Ciphertext [−][src]
#[non_exhaustive] pub enum Ciphertext { RSA { c: MPI, }, ElGamal { e: MPI, c: MPI, }, ECDH { e: MPI, key: Box<[u8]>, }, Unknown { mpis: Box<[MPI]>, rest: Box<[u8]>, }, }
An encrypted session key.
Provides a typed and structured way of storing multiple MPIs in
PKESK
packets.
Note: This enum cannot be exhaustively matched to allow future extensions.
Variants (Non-exhaustive)
RSA ciphertext.
Show fields
Fields of RSA
c: MPI
m^e mod N.
ElGamal ciphertext.
Elliptic curve ElGamal public key.
Unknown number of MPIs for an unknown algorithm.
Show fields
Implementations
impl Ciphertext
[src]
impl Ciphertext
[src]pub fn pk_algo(&self) -> Option<PublicKeyAlgorithm>
[src]
pub fn pk_algo(&self) -> Option<PublicKeyAlgorithm>
[src]Returns, if known, the public-key algorithm for this ciphertext.
impl Ciphertext
[src]
impl Ciphertext
[src]pub fn parse<R: Read + Send + Sync>(
algo: PublicKeyAlgorithm,
reader: R
) -> Result<Self>
[src]
pub fn parse<R: Read + Send + Sync>(
algo: PublicKeyAlgorithm,
reader: R
) -> Result<Self>
[src]Parses a set of OpenPGP MPIs representing a ciphertext.
Expects MPIs for a public key algorithm algo
s ciphertext.
See Section 3.2 of RFC 4880 for details.
Trait Implementations
impl Clone for Ciphertext
[src]
impl Clone for Ciphertext
[src]fn clone(&self) -> Ciphertext
[src]
fn clone(&self) -> Ciphertext
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for Ciphertext
[src]
impl Debug for Ciphertext
[src]impl Hash for Ciphertext
[src]
impl Hash for Ciphertext
[src]impl Hash for Ciphertext
[src]
impl Hash for Ciphertext
[src]impl Marshal for Ciphertext
[src]
impl Marshal for Ciphertext
[src]impl MarshalInto for Ciphertext
[src]
impl MarshalInto for Ciphertext
[src]impl Ord for Ciphertext
[src]
impl Ord for Ciphertext
[src]impl PartialEq<Ciphertext> for Ciphertext
[src]
impl PartialEq<Ciphertext> for Ciphertext
[src]fn eq(&self, other: &Ciphertext) -> bool
[src]
fn eq(&self, other: &Ciphertext) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &Ciphertext) -> bool
[src]
fn ne(&self, other: &Ciphertext) -> bool
[src]This method tests for !=
.
impl PartialOrd<Ciphertext> for Ciphertext
[src]
impl PartialOrd<Ciphertext> for Ciphertext
[src]fn partial_cmp(&self, other: &Ciphertext) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Ciphertext) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for Ciphertext
[src]
impl StructuralEq for Ciphertext
[src]
impl StructuralPartialEq for Ciphertext
[src]
Auto Trait Implementations
impl RefUnwindSafe for Ciphertext
impl Send for Ciphertext
impl Sync for Ciphertext
impl Unpin for Ciphertext
impl UnwindSafe for Ciphertext
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more