pub enum PublicKey {
EcdsaP256(VerifyingKey),
}Variants§
EcdsaP256(VerifyingKey)
Implementations§
Source§impl PublicKey
impl PublicKey
Sourcepub fn signature_algorithm(&self) -> SignatureAlgorithm
pub fn signature_algorithm(&self) -> SignatureAlgorithm
The signature algorithm used by this key
Sourcepub fn verify(
&self,
msg: &[u8],
signature: &Signature,
) -> Result<(), SignatureError>
pub fn verify( &self, msg: &[u8], signature: &Signature, ) -> Result<(), SignatureError>
Verify that a given message and signature were signed by the private key associated with this public key
Sourcepub fn fingerprint(&self) -> KeyID
pub fn fingerprint(&self) -> KeyID
Compute the digest of this key
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<VerifyingKey<NistP256>> for PublicKey
impl From<VerifyingKey<NistP256>> for PublicKey
Source§fn from(key: VerifyingKey) -> Self
fn from(key: VerifyingKey) -> Self
Converts to this type from the input type.
Source§impl Ord for PublicKey
impl Ord for PublicKey
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for PublicKey
impl PartialOrd for PublicKey
impl Eq for PublicKey
impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
impl Freeze for PublicKey
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin for PublicKey
impl UnsafeUnpin for PublicKey
impl UnwindSafe for PublicKey
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