pub struct Ed25519Verifier { /* private fields */ }Expand description
Decompresses the Edwards point once, for performance reasons.
VerifyingKey::from_bytes per proof was a measured ~8% of a firehose initiator’s CPU.
Implementations§
Source§impl Ed25519Verifier
impl Ed25519Verifier
pub fn new( public: &Ed25519PublicKey, ) -> Result<Ed25519Verifier, InvalidPublicKey>
pub fn public_key(&self) -> &Ed25519PublicKey
pub fn verify( &self, message: &[u8], signature: &Ed25519Signature, ) -> Result<(), InvalidSignature>
Trait Implementations§
Source§impl Clone for Ed25519Verifier
impl Clone for Ed25519Verifier
Source§fn clone(&self) -> Ed25519Verifier
fn clone(&self) -> Ed25519Verifier
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 moreAuto Trait Implementations§
impl Freeze for Ed25519Verifier
impl RefUnwindSafe for Ed25519Verifier
impl Send for Ed25519Verifier
impl Sync for Ed25519Verifier
impl Unpin for Ed25519Verifier
impl UnsafeUnpin for Ed25519Verifier
impl UnwindSafe for Ed25519Verifier
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