pub enum SignatureScheme {
Ed25519,
EcdsaP256Sha256,
EcdsaP384Sha384,
RsaPkcs1Sha256,
RsaPkcs1Sha384,
RsaPkcs1Sha512,
RsaPssRsaSha256,
RsaPssRsaSha384,
RsaPssRsaSha512,
}Expand description
Signature schemes (RFC 8446 §4.2.3).
Only the schemes needed for raw public key authentication are listed.
Variants§
Ed25519
Ed25519
EcdsaP256Sha256
ECDSA with NIST P-256 and SHA-256
EcdsaP384Sha384
ECDSA with NIST P-384 and SHA-384
RsaPkcs1Sha256
RSA PKCS#1 v1.5 with SHA-256
RsaPkcs1Sha384
RSA PKCS#1 v1.5 with SHA-384
RsaPkcs1Sha512
RSA PKCS#1 v1.5 with SHA-512
RsaPssRsaSha256
RSA-PSS with SHA-256 (RFC 8017)
RsaPssRsaSha384
RSA-PSS with SHA-384 (RFC 8017)
RsaPssRsaSha512
RSA-PSS with SHA-512 (RFC 8017)
Implementations§
Source§impl SignatureScheme
impl SignatureScheme
Sourcepub fn from_wire(bytes: [u8; 2]) -> Option<Self>
pub fn from_wire(bytes: [u8; 2]) -> Option<Self>
Parse a signature scheme from its wire identifier.
Sourcepub fn secret_key_size(self) -> usize
pub fn secret_key_size(self) -> usize
Expected size of the raw secret key in bytes.
Sourcepub fn public_key_size(self) -> usize
pub fn public_key_size(self) -> usize
Expected size of the raw public key in bytes.
Sourcepub fn signature_size(self) -> usize
pub fn signature_size(self) -> usize
Signature size in bytes.
Trait Implementations§
Source§impl Clone for SignatureScheme
impl Clone for SignatureScheme
Source§fn clone(&self) -> SignatureScheme
fn clone(&self) -> SignatureScheme
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SignatureScheme
Source§impl Debug for SignatureScheme
impl Debug for SignatureScheme
impl Eq for SignatureScheme
Source§impl Hash for SignatureScheme
impl Hash for SignatureScheme
Source§impl PartialEq for SignatureScheme
impl PartialEq for SignatureScheme
impl StructuralPartialEq for SignatureScheme
Auto Trait Implementations§
impl Freeze for SignatureScheme
impl RefUnwindSafe for SignatureScheme
impl Send for SignatureScheme
impl Sync for SignatureScheme
impl Unpin for SignatureScheme
impl UnsafeUnpin for SignatureScheme
impl UnwindSafe for SignatureScheme
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