pub struct VerificationContext<P: MayoParameter> { /* private fields */ }Expand description
A reusable MAYO verification context.
This stores an expanded verifying key plus mutable scratch buffers for repeated verification with the same public key.
Implementations§
Source§impl<P: MayoParameter> VerificationContext<P>
impl<P: MayoParameter> VerificationContext<P>
Sourcepub fn verify(
&mut self,
msg: &[u8],
signature: &Signature<P>,
) -> Result<(), Error>
pub fn verify( &mut self, msg: &[u8], signature: &Signature<P>, ) -> Result<(), Error>
Verify a signature using cached expanded public material and scratch buffers.
Sourcepub fn verifying_key(&self) -> &ExpandedVerifyingKey<P>
pub fn verifying_key(&self) -> &ExpandedVerifyingKey<P>
Return the expanded verifying key backing this context.
Trait Implementations§
Source§impl<P: MayoParameter> Debug for VerificationContext<P>
impl<P: MayoParameter> Debug for VerificationContext<P>
impl<P: MayoParameter> Eq for VerificationContext<P>
Source§impl<P: MayoParameter> From<&ExpandedVerifyingKey<P>> for VerificationContext<P>
impl<P: MayoParameter> From<&ExpandedVerifyingKey<P>> for VerificationContext<P>
Source§fn from(key: &ExpandedVerifyingKey<P>) -> Self
fn from(key: &ExpandedVerifyingKey<P>) -> Self
Converts to this type from the input type.
Source§impl<P: MayoParameter> From<&VerifyingKey<P>> for VerificationContext<P>
impl<P: MayoParameter> From<&VerifyingKey<P>> for VerificationContext<P>
Source§fn from(key: &VerifyingKey<P>) -> Self
fn from(key: &VerifyingKey<P>) -> Self
Converts to this type from the input type.
Source§impl<P: MayoParameter> PartialEq for VerificationContext<P>
impl<P: MayoParameter> PartialEq for VerificationContext<P>
Auto Trait Implementations§
impl<P> Freeze for VerificationContext<P>
impl<P> RefUnwindSafe for VerificationContext<P>where
P: RefUnwindSafe,
impl<P> Send for VerificationContext<P>
impl<P> Sync for VerificationContext<P>
impl<P> Unpin for VerificationContext<P>where
P: Unpin,
impl<P> UnsafeUnpin for VerificationContext<P>
impl<P> UnwindSafe for VerificationContext<P>where
P: UnwindSafe,
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