pub struct VerifyingKey { /* private fields */ }Expand description
Ed25519 verifying key (public key)
Implementations§
Source§impl VerifyingKey
impl VerifyingKey
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Create from raw bytes (32 bytes for Ed25519 public key)
§Errors
Returns error if bytes length is not 32 or key is invalid
Sourcepub fn verify(&self, message: &[u8], signature: &Signature) -> Result<()>
pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<()>
Verify a signature using Ed25519
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 (const: unstable) · 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<'de> Deserialize<'de> for VerifyingKey
impl<'de> Deserialize<'de> for VerifyingKey
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
impl Eq for VerifyingKey
Source§impl PartialEq for VerifyingKey
impl PartialEq for VerifyingKey
Source§fn eq(&self, other: &VerifyingKey) -> bool
fn eq(&self, other: &VerifyingKey) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for VerifyingKey
impl Serialize for VerifyingKey
impl StructuralPartialEq 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 UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.