MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / update

Method update

rust/stringzilla.rs:524–533  ·  view source on GitHub ↗

Updates the hasher with more data.

(&mut self, data: &[u8])

Source from the content-addressed store, hash-verified

522
523 /// Updates the hasher with more data.
524 pub fn update(&mut self, data: &[u8]) -> &mut Self {
525 unsafe {
526 sz_hash_state_update(
527 self as *mut _ as *mut c_void,
528 data.as_ptr() as *const c_void,
529 data.len(),
530 );
531 }
532 self
533 }
534
535 /// Returns the current hash value without consuming the state.
536 pub fn digest(&self) -> u64 {

Callers 8

hashMethod · 0.80
hmac_sha256Function · 0.80
writeMethod · 0.80
sha256_incrementalFunction · 0.80
test_sha256Function · 0.80
test.jsFile · 0.80

Calls 4

as_ptrMethod · 0.80
lenMethod · 0.80
sz_hash_state_updateFunction · 0.50
sz_sha256_state_updateFunction · 0.50

Tested by 4

sha256_incrementalFunction · 0.64
test_sha256Function · 0.64