pub struct Verifier { /* private fields */ }Expand description
Verifies a log’s entries in sequence against the signer’s public identity.
A verifier checks each entry’s index, its link to the previous entry, and its signature, advancing only on success. Feed it entries oldest first; the first failure is the point the log was tampered with.
Implementations§
Source§impl Verifier
impl Verifier
Sourcepub fn check(&mut self, entry: &Entry) -> Result<()>
pub fn check(&mut self, entry: &Entry) -> Result<()>
Verifies the next entry in sequence, advancing the verifier on success.
§Arguments
entry- the next entry in the log.
§Returns
Ok(()) if the entry is in sequence, correctly chained, and authentically
signed.
§Errors
Returns Error::Auth if the entry is out of
sequence, its chain link is wrong, or its signature does not verify.
Auto Trait Implementations§
impl Freeze for Verifier
impl RefUnwindSafe for Verifier
impl Send for Verifier
impl Sync for Verifier
impl Unpin for Verifier
impl UnsafeUnpin for Verifier
impl UnwindSafe for Verifier
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