MCPcopy Index your code
hub / github.com/RustPython/RustPython / hash_bytes

Method hash_bytes

crates/common/src/hash.rs:71–77  ·  view source on GitHub ↗
(&self, value: &[u8])

Source from the content-addressed store, hash-verified

69 }
70
71 pub fn hash_bytes(&self, value: &[u8]) -> PyHash {
72 if value.is_empty() {
73 0
74 } else {
75 self.hash_value(value)
76 }
77 }
78
79 pub fn hash_str(&self, value: &str) -> PyHash {
80 self.hash_bytes(value.as_bytes())

Callers 6

hash_strMethod · 0.80
key_hashMethod · 0.80
hashMethod · 0.80
hashMethod · 0.80
_compute_hashMethod · 0.80
hashMethod · 0.80

Calls 2

hash_valueMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected