pub enum VerifyingKey {
Dsa(DsaVerifyingKey),
Rsa(RsaVerifyingKey),
Ecdsa(EcdsaVerifyingKey),
Ed25519(Ed25519VerifyingKey),
}
Expand description
Structure used to verify a signature
Variants§
Dsa(DsaVerifyingKey)
Available on crate feature
dsa
only.DSA Keys
Rsa(RsaVerifyingKey)
Available on crate feature
rsa
only.RSA Keys
Ecdsa(EcdsaVerifyingKey)
Available on crate features
k256
or p192
or p224
or p256
or p384
only.ECDSA Keys
Ed25519(Ed25519VerifyingKey)
Available on crate feature
ed25519
only.ED25519 Keys
Implementations§
Source§impl VerifyingKey
impl VerifyingKey
Sourcepub fn new(key_info: SubjectPublicKeyInfoRef<'_>) -> Result<Self, Error>
pub fn new(key_info: SubjectPublicKeyInfoRef<'_>) -> Result<Self, Error>
Creates a new VerifyingKey
given the SubjectPublicKeyInfo
Sourcepub fn verify<'a, V, M, S>(&self, verify_info: V) -> Result<(), Error>
pub fn verify<'a, V, M, S>(&self, verify_info: V) -> Result<(), Error>
Verifies the signature given the VerifyInfo
Sourcepub fn verify_strict<'a, V, M, S>(&self, verify_info: V) -> Result<(), Error>
pub fn verify_strict<'a, V, M, S>(&self, verify_info: V) -> Result<(), Error>
Verifies the signature given the VerifyInfo
. Does not normalize ECDSA and EdDSA
signatures prior to verification.
Trait Implementations§
Source§impl Clone for VerifyingKey
impl Clone for VerifyingKey
Source§fn clone(&self) -> VerifyingKey
fn clone(&self) -> VerifyingKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VerifyingKey
impl Debug for VerifyingKey
Source§impl TryFrom<&CertificateInner> for VerifyingKey
Available on crate feature x509
only.
impl TryFrom<&CertificateInner> for VerifyingKey
Available on crate feature
x509
only.Source§impl TryFrom<CertificateInner> for VerifyingKey
Available on crate feature x509
only.
impl TryFrom<CertificateInner> for VerifyingKey
Available on crate feature
x509
only.Source§impl TryFrom<SubjectPublicKeyInfo<Any, BitString>> for VerifyingKey
impl TryFrom<SubjectPublicKeyInfo<Any, BitString>> for VerifyingKey
Source§impl TryFrom<SubjectPublicKeyInfo<AnyRef<'_>, BitStringRef<'_>>> for VerifyingKey
impl TryFrom<SubjectPublicKeyInfo<AnyRef<'_>, BitStringRef<'_>>> for VerifyingKey
Auto Trait Implementations§
impl Freeze for VerifyingKey
impl RefUnwindSafe for VerifyingKey
impl Send for VerifyingKey
impl Sync for VerifyingKey
impl Unpin for VerifyingKey
impl UnwindSafe for VerifyingKey
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