pub struct VerifyingKey(/* private fields */);Expand description
An Ed25519 verifying key: a compressed edwards25519 point, 32 bytes.
Parsing does not validate the point; the driver does, when the key is
used, and reports Error::InvalidKey.
Implementations§
Source§impl VerifyingKey
impl VerifyingKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
pub fn from_bytes(bytes: &[u8; 32]) -> Self
Load a verifying key.
Sourcepub fn as_driver(&self) -> &Ed25519PublicKey
pub fn as_driver(&self) -> &Ed25519PublicKey
The driver representation.
Sourcepub fn verify(&self, msg: &[u8], signature: &Signature) -> Result<(), Error>
pub fn verify(&self, msg: &[u8], signature: &Signature) -> Result<(), Error>
Verify the signature of a message.
Fails with Error::InvalidSignature if the signature does not
verify, or with Error::InvalidKey if this key does not decode to
a point on the curve.
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 moreimpl Copy for VerifyingKey
Source§impl Debug for VerifyingKey
impl Debug for VerifyingKey
impl Eq for VerifyingKey
Source§impl Format for VerifyingKeywhere
Ed25519PublicKey: Format,
impl Format for VerifyingKeywhere
Ed25519PublicKey: Format,
Source§impl PartialEq for VerifyingKey
impl PartialEq 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