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 | |
Serhiy Storchaka | 247789c | 2015-04-24 00:40:51 +0300 | [diff] [blame^] | 105 | if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:sha512", _keywords, |
Serhiy Storchaka | 1009bf1 | 2015-04-03 23:53:51 +0300 | [diff] [blame] | 106 | &string)) |
| 107 | goto exit; |
| 108 | return_value = _sha512_sha512_impl(module, string); |
| 109 | |
| 110 | exit: |
| 111 | return return_value; |
| 112 | } |
| 113 | |
| 114 | #endif /* defined(PY_LONG_LONG) */ |
| 115 | |
| 116 | #if defined(PY_LONG_LONG) |
| 117 | |
| 118 | PyDoc_STRVAR(_sha512_sha384__doc__, |
| 119 | "sha384($module, /, string=b\'\')\n" |
| 120 | "--\n" |
| 121 | "\n" |
| 122 | "Return a new SHA-384 hash object; optionally initialized with a string."); |
| 123 | |
| 124 | #define _SHA512_SHA384_METHODDEF \ |
| 125 | {"sha384", (PyCFunction)_sha512_sha384, METH_VARARGS|METH_KEYWORDS, _sha512_sha384__doc__}, |
| 126 | |
| 127 | static PyObject * |
| 128 | _sha512_sha384_impl(PyModuleDef *module, PyObject *string); |
| 129 | |
| 130 | static PyObject * |
| 131 | _sha512_sha384(PyModuleDef *module, PyObject *args, PyObject *kwargs) |
| 132 | { |
| 133 | PyObject *return_value = NULL; |
| 134 | static char *_keywords[] = {"string", NULL}; |
| 135 | PyObject *string = NULL; |
| 136 | |
Serhiy Storchaka | 247789c | 2015-04-24 00:40:51 +0300 | [diff] [blame^] | 137 | if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:sha384", _keywords, |
Serhiy Storchaka | 1009bf1 | 2015-04-03 23:53:51 +0300 | [diff] [blame] | 138 | &string)) |
| 139 | goto exit; |
| 140 | return_value = _sha512_sha384_impl(module, string); |
| 141 | |
| 142 | exit: |
| 143 | return return_value; |
| 144 | } |
| 145 | |
| 146 | #endif /* defined(PY_LONG_LONG) */ |
| 147 | |
| 148 | #ifndef SHA512TYPE_COPY_METHODDEF |
| 149 | #define SHA512TYPE_COPY_METHODDEF |
| 150 | #endif /* !defined(SHA512TYPE_COPY_METHODDEF) */ |
| 151 | |
| 152 | #ifndef SHA512TYPE_DIGEST_METHODDEF |
| 153 | #define SHA512TYPE_DIGEST_METHODDEF |
| 154 | #endif /* !defined(SHA512TYPE_DIGEST_METHODDEF) */ |
| 155 | |
| 156 | #ifndef SHA512TYPE_HEXDIGEST_METHODDEF |
| 157 | #define SHA512TYPE_HEXDIGEST_METHODDEF |
| 158 | #endif /* !defined(SHA512TYPE_HEXDIGEST_METHODDEF) */ |
| 159 | |
| 160 | #ifndef SHA512TYPE_UPDATE_METHODDEF |
| 161 | #define SHA512TYPE_UPDATE_METHODDEF |
| 162 | #endif /* !defined(SHA512TYPE_UPDATE_METHODDEF) */ |
| 163 | |
| 164 | #ifndef _SHA512_SHA512_METHODDEF |
| 165 | #define _SHA512_SHA512_METHODDEF |
| 166 | #endif /* !defined(_SHA512_SHA512_METHODDEF) */ |
| 167 | |
| 168 | #ifndef _SHA512_SHA384_METHODDEF |
| 169 | #define _SHA512_SHA384_METHODDEF |
| 170 | #endif /* !defined(_SHA512_SHA384_METHODDEF) */ |
Serhiy Storchaka | 247789c | 2015-04-24 00:40:51 +0300 | [diff] [blame^] | 171 | /*[clinic end generated code: output=1c7d385731fee7c0 input=a9049054013a1b77]*/ |