Home | History | Annotate | Download | only in clinic
      1 /*[clinic input]
      2 preserve
      3 [clinic start generated code]*/
      4 
      5 PyDoc_STRVAR(SHA1Type_copy__doc__,
      6 "copy($self, /)\n"
      7 "--\n"
      8 "\n"
      9 "Return a copy of the hash object.");
     10 
     11 #define SHA1TYPE_COPY_METHODDEF    \
     12     {"copy", (PyCFunction)SHA1Type_copy, METH_NOARGS, SHA1Type_copy__doc__},
     13 
     14 static PyObject *
     15 SHA1Type_copy_impl(SHA1object *self);
     16 
     17 static PyObject *
     18 SHA1Type_copy(SHA1object *self, PyObject *Py_UNUSED(ignored))
     19 {
     20     return SHA1Type_copy_impl(self);
     21 }
     22 
     23 PyDoc_STRVAR(SHA1Type_digest__doc__,
     24 "digest($self, /)\n"
     25 "--\n"
     26 "\n"
     27 "Return the digest value as a string of binary data.");
     28 
     29 #define SHA1TYPE_DIGEST_METHODDEF    \
     30     {"digest", (PyCFunction)SHA1Type_digest, METH_NOARGS, SHA1Type_digest__doc__},
     31 
     32 static PyObject *
     33 SHA1Type_digest_impl(SHA1object *self);
     34 
     35 static PyObject *
     36 SHA1Type_digest(SHA1object *self, PyObject *Py_UNUSED(ignored))
     37 {
     38     return SHA1Type_digest_impl(self);
     39 }
     40 
     41 PyDoc_STRVAR(SHA1Type_hexdigest__doc__,
     42 "hexdigest($self, /)\n"
     43 "--\n"
     44 "\n"
     45 "Return the digest value as a string of hexadecimal digits.");
     46 
     47 #define SHA1TYPE_HEXDIGEST_METHODDEF    \
     48     {"hexdigest", (PyCFunction)SHA1Type_hexdigest, METH_NOARGS, SHA1Type_hexdigest__doc__},
     49 
     50 static PyObject *
     51 SHA1Type_hexdigest_impl(SHA1object *self);
     52 
     53 static PyObject *
     54 SHA1Type_hexdigest(SHA1object *self, PyObject *Py_UNUSED(ignored))
     55 {
     56     return SHA1Type_hexdigest_impl(self);
     57 }
     58 
     59 PyDoc_STRVAR(SHA1Type_update__doc__,
     60 "update($self, obj, /)\n"
     61 "--\n"
     62 "\n"
     63 "Update this hash object\'s state with the provided string.");
     64 
     65 #define SHA1TYPE_UPDATE_METHODDEF    \
     66     {"update", (PyCFunction)SHA1Type_update, METH_O, SHA1Type_update__doc__},
     67 
     68 PyDoc_STRVAR(_sha1_sha1__doc__,
     69 "sha1($module, /, string=b\'\')\n"
     70 "--\n"
     71 "\n"
     72 "Return a new SHA1 hash object; optionally initialized with a string.");
     73 
     74 #define _SHA1_SHA1_METHODDEF    \
     75     {"sha1", (PyCFunction)_sha1_sha1, METH_FASTCALL, _sha1_sha1__doc__},
     76 
     77 static PyObject *
     78 _sha1_sha1_impl(PyObject *module, PyObject *string);
     79 
     80 static PyObject *
     81 _sha1_sha1(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
     82 {
     83     PyObject *return_value = NULL;
     84     static const char * const _keywords[] = {"string", NULL};
     85     static _PyArg_Parser _parser = {"|O:sha1", _keywords, 0};
     86     PyObject *string = NULL;
     87 
     88     if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
     89         &string)) {
     90         goto exit;
     91     }
     92     return_value = _sha1_sha1_impl(module, string);
     93 
     94 exit:
     95     return return_value;
     96 }
     97 /*[clinic end generated code: output=1430450f3f806895 input=a9049054013a1b77]*/
     98