Enum sequoia_openpgp::crypto::mpi::Signature
source · #[non_exhaustive]pub enum Signature {
RSA {
s: MPI,
},
DSA {
r: MPI,
s: MPI,
},
ElGamal {
r: MPI,
s: MPI,
},
EdDSA {
r: MPI,
s: MPI,
},
ECDSA {
r: MPI,
s: MPI,
},
Unknown {
mpis: Box<[MPI]>,
rest: Box<[u8]>,
},
}
Expand description
A cryptographic signature.
Provides a typed and structured way of storing multiple MPIs in
Signature
packets.
Note: This enum cannot be exhaustively matched to allow future extensions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
RSA
RSA signature.
DSA
NIST’s DSA signature.
ElGamal
ElGamal signature.
EdDSA
DJB’s “Twisted” Edwards curve DSA signature.
ECDSA
NIST’s Elliptic curve DSA signature.
Unknown
Unknown number of MPIs for an unknown algorithm.
Implementations§
Trait Implementations§
source§impl MarshalInto for Signature
impl MarshalInto for Signature
source§fn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
Computes the maximal length of the serialized representation. Read more
source§fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
Serializes into the given buffer. Read more
source§impl Ord for Signature
impl Ord for Signature
source§impl PartialEq for Signature
impl PartialEq for Signature
source§impl PartialOrd for Signature
impl PartialOrd for Signature
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)