pub struct SumHasher { /* private fields */ }Expand description
Streaming composite ISCC-CODE (Sum) generator.
Runs the Data-Code (CDC/MinHash) and Instance-Code (BLAKE3) algorithms in a
single pass over the input by feeding the same bytes to an inner
DataHasher and InstanceHasher, then composes the final ISCC-CODE.
Produces output identical to gen_sum_code_v0 for the same byte stream.
Implementations§
Source§impl SumHasher
impl SumHasher
Sourcepub fn finalize(
self,
bits: u32,
wide: bool,
add_units: bool,
) -> IsccResult<SumCodeResult>
pub fn finalize( self, bits: u32, wide: bool, add_units: bool, ) -> IsccResult<SumCodeResult>
Consume the hasher and produce a composite ISCC-CODE result.
Finalizes the inner Data-Code and Instance-Code, then composes them via
gen_iscc_code_v0. When add_units is true, the result includes the
individual Data-Code and Instance-Code ISCC strings at the requested
bits precision. Equivalent to calling gen_sum_code_v0 on a file
containing the concatenation of all data passed to update.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SumHasher
impl RefUnwindSafe for SumHasher
impl Send for SumHasher
impl Sync for SumHasher
impl Unpin for SumHasher
impl UnsafeUnpin for SumHasher
impl UnwindSafe for SumHasher
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