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

Function Sha256_init

python/stringzilla.c:5994–6007  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5992}
5993
5994static int Sha256_init(Sha256 *self, PyObject *args, PyObject *kwargs) {
5995 // No arguments expected
5996 Py_ssize_t nargs = PyTuple_Size(args);
5997 if (nargs > 0) {
5998 PyErr_SetString(PyExc_TypeError, "Sha256() takes no positional arguments");
5999 return -1;
6000 }
6001 if (kwargs && PyDict_Size(kwargs) > 0) {
6002 PyErr_SetString(PyExc_TypeError, "Sha256() takes no keyword arguments");
6003 return -1;
6004 }
6005 sz_sha256_state_init(&self->state);
6006 return 0;
6007}
6008
6009static PyObject *Sha256_update(PyObject *self_obj, PyObject *arg) {
6010 Sha256 *self = (Sha256 *)self_obj;

Callers

nothing calls this directly

Calls 1

sz_sha256_state_initFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…