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]>, }, }
Expand description
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)
This enum is marked as 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
Returns, if known, the public-key algorithm for this ciphertext.
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
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
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self