| Serhiy Storchaka | 1009bf1 | 2015-04-03 23:53:51 +0300 | [diff] [blame] | 1 | /*[clinic input] | 
 | 2 | preserve | 
 | 3 | [clinic start generated code]*/ | 
 | 4 |  | 
 | 5 | #if defined(PY_LONG_LONG) | 
 | 6 |  | 
 | 7 | PyDoc_STRVAR(SHA512Type_copy__doc__, | 
 | 8 | "copy($self, /)\n" | 
 | 9 | "--\n" | 
 | 10 | "\n" | 
 | 11 | "Return a copy of the hash object."); | 
 | 12 |  | 
 | 13 | #define SHA512TYPE_COPY_METHODDEF    \ | 
 | 14 |     {"copy", (PyCFunction)SHA512Type_copy, METH_NOARGS, SHA512Type_copy__doc__}, | 
 | 15 |  | 
 | 16 | static PyObject * | 
 | 17 | SHA512Type_copy_impl(SHAobject *self); | 
 | 18 |  | 
 | 19 | static PyObject * | 
 | 20 | SHA512Type_copy(SHAobject *self, PyObject *Py_UNUSED(ignored)) | 
 | 21 | { | 
 | 22 |     return SHA512Type_copy_impl(self); | 
 | 23 | } | 
 | 24 |  | 
 | 25 | #endif /* defined(PY_LONG_LONG) */ | 
 | 26 |  | 
 | 27 | #if defined(PY_LONG_LONG) | 
 | 28 |  | 
 | 29 | PyDoc_STRVAR(SHA512Type_digest__doc__, | 
 | 30 | "digest($self, /)\n" | 
 | 31 | "--\n" | 
 | 32 | "\n" | 
 | 33 | "Return the digest value as a string of binary data."); | 
 | 34 |  | 
 | 35 | #define SHA512TYPE_DIGEST_METHODDEF    \ | 
 | 36 |     {"digest", (PyCFunction)SHA512Type_digest, METH_NOARGS, SHA512Type_digest__doc__}, | 
 | 37 |  | 
 | 38 | static PyObject * | 
 | 39 | SHA512Type_digest_impl(SHAobject *self); | 
 | 40 |  | 
 | 41 | static PyObject * | 
 | 42 | SHA512Type_digest(SHAobject *self, PyObject *Py_UNUSED(ignored)) | 
 | 43 | { | 
 | 44 |     return SHA512Type_digest_impl(self); | 
 | 45 | } | 
 | 46 |  | 
 | 47 | #endif /* defined(PY_LONG_LONG) */ | 
 | 48 |  | 
 | 49 | #if defined(PY_LONG_LONG) | 
 | 50 |  | 
 | 51 | PyDoc_STRVAR(SHA512Type_hexdigest__doc__, | 
 | 52 | "hexdigest($self, /)\n" | 
 | 53 | "--\n" | 
 | 54 | "\n" | 
 | 55 | "Return the digest value as a string of hexadecimal digits."); | 
 | 56 |  | 
 | 57 | #define SHA512TYPE_HEXDIGEST_METHODDEF    \ | 
 | 58 |     {"hexdigest", (PyCFunction)SHA512Type_hexdigest, METH_NOARGS, SHA512Type_hexdigest__doc__}, | 
 | 59 |  | 
 | 60 | static PyObject * | 
 | 61 | SHA512Type_hexdigest_impl(SHAobject *self); | 
 | 62 |  | 
 | 63 | static PyObject * | 
 | 64 | SHA512Type_hexdigest(SHAobject *self, PyObject *Py_UNUSED(ignored)) | 
 | 65 | { | 
 | 66 |     return SHA512Type_hexdigest_impl(self); | 
 | 67 | } | 
 | 68 |  | 
 | 69 | #endif /* defined(PY_LONG_LONG) */ | 
 | 70 |  | 
 | 71 | #if defined(PY_LONG_LONG) | 
 | 72 |  | 
 | 73 | PyDoc_STRVAR(SHA512Type_update__doc__, | 
 | 74 | "update($self, obj, /)\n" | 
 | 75 | "--\n" | 
 | 76 | "\n" | 
 | 77 | "Update this hash object\'s state with the provided string."); | 
 | 78 |  | 
 | 79 | #define SHA512TYPE_UPDATE_METHODDEF    \ | 
 | 80 |     {"update", (PyCFunction)SHA512Type_update, METH_O, SHA512Type_update__doc__}, | 
 | 81 |  | 
 | 82 | #endif /* defined(PY_LONG_LONG) */ | 
 | 83 |  | 
 | 84 | #if defined(PY_LONG_LONG) | 
 | 85 |  | 
 | 86 | PyDoc_STRVAR(_sha512_sha512__doc__, | 
 | 87 | "sha512($module, /, string=b\'\')\n" | 
 | 88 | "--\n" | 
 | 89 | "\n" | 
 | 90 | "Return a new SHA-512 hash object; optionally initialized with a string."); | 
 | 91 |  | 
 | 92 | #define _SHA512_SHA512_METHODDEF    \ | 
 | 93 |     {"sha512", (PyCFunction)_sha512_sha512, METH_VARARGS|METH_KEYWORDS, _sha512_sha512__doc__}, | 
 | 94 |  | 
 | 95 | static PyObject * | 
 | 96 | _sha512_sha512_impl(PyModuleDef *module, PyObject *string); | 
 | 97 |  | 
 | 98 | static PyObject * | 
 | 99 | _sha512_sha512(PyModuleDef *module, PyObject *args, PyObject *kwargs) | 
 | 100 | { | 
 | 101 |     PyObject *return_value = NULL; | 
 | 102 |     static char *_keywords[] = {"string", NULL}; | 
 | 103 |     PyObject *string = NULL; | 
 | 104 |  | 
 | 105 |     if (!PyArg_ParseTupleAndKeywords(args, kwargs, | 
 | 106 |         "|O:sha512", _keywords, | 
 | 107 |         &string)) | 
 | 108 |         goto exit; | 
 | 109 |     return_value = _sha512_sha512_impl(module, string); | 
 | 110 |  | 
 | 111 | exit: | 
 | 112 |     return return_value; | 
 | 113 | } | 
 | 114 |  | 
 | 115 | #endif /* defined(PY_LONG_LONG) */ | 
 | 116 |  | 
 | 117 | #if defined(PY_LONG_LONG) | 
 | 118 |  | 
 | 119 | PyDoc_STRVAR(_sha512_sha384__doc__, | 
 | 120 | "sha384($module, /, string=b\'\')\n" | 
 | 121 | "--\n" | 
 | 122 | "\n" | 
 | 123 | "Return a new SHA-384 hash object; optionally initialized with a string."); | 
 | 124 |  | 
 | 125 | #define _SHA512_SHA384_METHODDEF    \ | 
 | 126 |     {"sha384", (PyCFunction)_sha512_sha384, METH_VARARGS|METH_KEYWORDS, _sha512_sha384__doc__}, | 
 | 127 |  | 
 | 128 | static PyObject * | 
 | 129 | _sha512_sha384_impl(PyModuleDef *module, PyObject *string); | 
 | 130 |  | 
 | 131 | static PyObject * | 
 | 132 | _sha512_sha384(PyModuleDef *module, PyObject *args, PyObject *kwargs) | 
 | 133 | { | 
 | 134 |     PyObject *return_value = NULL; | 
 | 135 |     static char *_keywords[] = {"string", NULL}; | 
 | 136 |     PyObject *string = NULL; | 
 | 137 |  | 
 | 138 |     if (!PyArg_ParseTupleAndKeywords(args, kwargs, | 
 | 139 |         "|O:sha384", _keywords, | 
 | 140 |         &string)) | 
 | 141 |         goto exit; | 
 | 142 |     return_value = _sha512_sha384_impl(module, string); | 
 | 143 |  | 
 | 144 | exit: | 
 | 145 |     return return_value; | 
 | 146 | } | 
 | 147 |  | 
 | 148 | #endif /* defined(PY_LONG_LONG) */ | 
 | 149 |  | 
 | 150 | #ifndef SHA512TYPE_COPY_METHODDEF | 
 | 151 |     #define SHA512TYPE_COPY_METHODDEF | 
 | 152 | #endif /* !defined(SHA512TYPE_COPY_METHODDEF) */ | 
 | 153 |  | 
 | 154 | #ifndef SHA512TYPE_DIGEST_METHODDEF | 
 | 155 |     #define SHA512TYPE_DIGEST_METHODDEF | 
 | 156 | #endif /* !defined(SHA512TYPE_DIGEST_METHODDEF) */ | 
 | 157 |  | 
 | 158 | #ifndef SHA512TYPE_HEXDIGEST_METHODDEF | 
 | 159 |     #define SHA512TYPE_HEXDIGEST_METHODDEF | 
 | 160 | #endif /* !defined(SHA512TYPE_HEXDIGEST_METHODDEF) */ | 
 | 161 |  | 
 | 162 | #ifndef SHA512TYPE_UPDATE_METHODDEF | 
 | 163 |     #define SHA512TYPE_UPDATE_METHODDEF | 
 | 164 | #endif /* !defined(SHA512TYPE_UPDATE_METHODDEF) */ | 
 | 165 |  | 
 | 166 | #ifndef _SHA512_SHA512_METHODDEF | 
 | 167 |     #define _SHA512_SHA512_METHODDEF | 
 | 168 | #endif /* !defined(_SHA512_SHA512_METHODDEF) */ | 
 | 169 |  | 
 | 170 | #ifndef _SHA512_SHA384_METHODDEF | 
 | 171 |     #define _SHA512_SHA384_METHODDEF | 
 | 172 | #endif /* !defined(_SHA512_SHA384_METHODDEF) */ | 
 | 173 | /*[clinic end generated code: output=de7bda19fde49310 input=a9049054013a1b77]*/ |