pub struct HmacSha256Chain { /* private fields */ }Expand description
HMAC-SHA256-keyed IntegrityChain.
Implementations§
Trait Implementations§
Source§impl IntegrityChain for HmacSha256Chain
impl IntegrityChain for HmacSha256Chain
Source§fn sign_event(
&self,
prev_signature: &EventSignature,
event: &Event,
) -> Result<EventSignature, IntegrityError>
fn sign_event( &self, prev_signature: &EventSignature, event: &Event, ) -> Result<EventSignature, IntegrityError>
Compute the signature over
prev_signature || canonical_event_bytes.Source§fn verify_chain(&self, events: &[(Event, EventSignature)]) -> IntegrityResult
fn verify_chain(&self, events: &[(Event, EventSignature)]) -> IntegrityResult
Verify a contiguous in-order event stream. Returns
Valid if every
event’s signature matches the chained recomputation, else Broken
with the first failure.Auto Trait Implementations§
impl Freeze for HmacSha256Chain
impl RefUnwindSafe for HmacSha256Chain
impl Send for HmacSha256Chain
impl Sync for HmacSha256Chain
impl Unpin for HmacSha256Chain
impl UnsafeUnpin for HmacSha256Chain
impl UnwindSafe for HmacSha256Chain
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