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

Function Hasher_hexdigest

python/stringzilla.c:5938–5945  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5936}
5937
5938static PyObject *Hasher_hexdigest(PyObject *self_obj, PyObject *noargs) {
5939 sz_unused_(noargs);
5940 Hasher *self = (Hasher *)self_obj;
5941 sz_u64_t hash = sz_hash_state_digest(&self->state);
5942 char buf[17]; // lowercase, zero-padded 16 hex digits
5943 snprintf(buf, sizeof(buf), "%016llx", (unsigned long long)hash);
5944 return PyUnicode_FromString(buf);
5945}
5946
5947static PyObject *Hasher_reset(PyObject *self_obj, PyObject *noargs) {
5948 sz_unused_(noargs);

Callers

nothing calls this directly

Calls 1

sz_hash_state_digestFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…