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

Function sha256_incremental

rust/stringzilla.rs:3872–3882  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3870
3871 #[test]
3872 fn sha256_incremental() {
3873 let mut hasher = sz::Sha256::new();
3874 hasher.update(b"ab");
3875 hasher.update(b"c");
3876 let hash = hasher.digest();
3877 let expected = [
3878 0xba, 0x78, 0x16, 0xbf, 0x8f, 0x01, 0xcf, 0xea, 0x41, 0x41, 0x40, 0xde, 0x5d, 0xae, 0x22, 0x23, 0xb0, 0x03,
3879 0x61, 0xa3, 0x96, 0x17, 0x7a, 0x9c, 0xb4, 0x10, 0xff, 0x61, 0xf2, 0x00, 0x15, 0xad,
3880 ];
3881 assert_eq!(hash, expected);
3882 }
3883
3884 #[test]
3885 fn sha256_long() {

Callers

nothing calls this directly

Calls 2

updateMethod · 0.80
digestMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…