#[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,
},
Ed25519 {
s: Box<[u8; 64]>,
},
Ed448 {
s: Box<[u8; 114]>,
},
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.
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.
Ed25519
Ed25519 signature.
Ed448
Ed448 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 PartialOrd for Signature
impl PartialOrd for Signature
impl 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