[Python-checkins] bpo-37630: Fix spelling shake128 -> shake_128 (GH-20154)

Christian Heimes webhook-mailer at python.org
Sun May 17 12:32:55 EDT 2020


https://github.com/python/cpython/commit/62ecd8a8f908282726d2f019c93efa1cf2e9e784
commit: 62ecd8a8f908282726d2f019c93efa1cf2e9e784
branch: master
author: Christian Heimes <christian at python.org>
committer: GitHub <noreply at github.com>
date: 2020-05-17T18:32:38+02:00
summary:

bpo-37630: Fix spelling shake128 -> shake_128 (GH-20154)

files:
M Modules/_hashopenssl.c
M Modules/clinic/_hashopenssl.c.h

diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
index 292e92a375268..36ad6a65d72cf 100644
--- a/Modules/_hashopenssl.c
+++ b/Modules/_hashopenssl.c
@@ -1062,39 +1062,39 @@ _hashlib_openssl_sha3_512_impl(PyObject *module, PyObject *data_obj,
 
 #ifdef PY_OPENSSL_HAS_SHAKE
 /*[clinic input]
-_hashlib.openssl_shake128
+_hashlib.openssl_shake_128
 
     string as data_obj: object(py_default="b''") = NULL
     *
     usedforsecurity: bool = True
 
-Returns a shake128 variable hash object; optionally initialized with a string
+Returns a shake-128 variable hash object; optionally initialized with a string
 
 [clinic start generated code]*/
 
 static PyObject *
-_hashlib_openssl_shake128_impl(PyObject *module, PyObject *data_obj,
-                               int usedforsecurity)
-/*[clinic end generated code: output=c68a0e30b4c09e1a input=b6d1e9566bacbb64]*/
+_hashlib_openssl_shake_128_impl(PyObject *module, PyObject *data_obj,
+                                int usedforsecurity)
+/*[clinic end generated code: output=bc49cdd8ada1fa97 input=6c9d67440eb33ec8]*/
 {
     return EVP_fast_new(module, data_obj, EVP_shake128(), usedforsecurity);
 }
 
 /*[clinic input]
-_hashlib.openssl_shake256
+_hashlib.openssl_shake_256
 
     string as data_obj: object(py_default="b''") = NULL
     *
     usedforsecurity: bool = True
 
-Returns a shake256 variable hash object; optionally initialized with a string
+Returns a shake-256 variable hash object; optionally initialized with a string
 
 [clinic start generated code]*/
 
 static PyObject *
-_hashlib_openssl_shake256_impl(PyObject *module, PyObject *data_obj,
-                               int usedforsecurity)
-/*[clinic end generated code: output=d56387762dcad516 input=591b9b78c0498116]*/
+_hashlib_openssl_shake_256_impl(PyObject *module, PyObject *data_obj,
+                                int usedforsecurity)
+/*[clinic end generated code: output=358d213be8852df7 input=479cbe9fefd4a9f8]*/
 {
     return EVP_fast_new(module, data_obj, EVP_shake256(), usedforsecurity);
 }
@@ -1841,8 +1841,8 @@ static struct PyMethodDef EVP_functions[] = {
     _HASHLIB_OPENSSL_SHA3_256_METHODDEF
     _HASHLIB_OPENSSL_SHA3_384_METHODDEF
     _HASHLIB_OPENSSL_SHA3_512_METHODDEF
-    _HASHLIB_OPENSSL_SHAKE128_METHODDEF
-    _HASHLIB_OPENSSL_SHAKE256_METHODDEF
+    _HASHLIB_OPENSSL_SHAKE_128_METHODDEF
+    _HASHLIB_OPENSSL_SHAKE_256_METHODDEF
     {NULL,      NULL}            /* Sentinel */
 };
 
diff --git a/Modules/clinic/_hashopenssl.c.h b/Modules/clinic/_hashopenssl.c.h
index 8745fc7052ba1..5ab4e996bf96b 100644
--- a/Modules/clinic/_hashopenssl.c.h
+++ b/Modules/clinic/_hashopenssl.c.h
@@ -766,25 +766,25 @@ _hashlib_openssl_sha3_512(PyObject *module, PyObject *const *args, Py_ssize_t na
 
 #if defined(PY_OPENSSL_HAS_SHAKE)
 
-PyDoc_STRVAR(_hashlib_openssl_shake128__doc__,
-"openssl_shake128($module, /, string=b\'\', *, usedforsecurity=True)\n"
+PyDoc_STRVAR(_hashlib_openssl_shake_128__doc__,
+"openssl_shake_128($module, /, string=b\'\', *, usedforsecurity=True)\n"
 "--\n"
 "\n"
-"Returns a shake128 variable hash object; optionally initialized with a string");
+"Returns a shake-128 variable hash object; optionally initialized with a string");
 
-#define _HASHLIB_OPENSSL_SHAKE128_METHODDEF    \
-    {"openssl_shake128", (PyCFunction)(void(*)(void))_hashlib_openssl_shake128, METH_FASTCALL|METH_KEYWORDS, _hashlib_openssl_shake128__doc__},
+#define _HASHLIB_OPENSSL_SHAKE_128_METHODDEF    \
+    {"openssl_shake_128", (PyCFunction)(void(*)(void))_hashlib_openssl_shake_128, METH_FASTCALL|METH_KEYWORDS, _hashlib_openssl_shake_128__doc__},
 
 static PyObject *
-_hashlib_openssl_shake128_impl(PyObject *module, PyObject *data_obj,
-                               int usedforsecurity);
+_hashlib_openssl_shake_128_impl(PyObject *module, PyObject *data_obj,
+                                int usedforsecurity);
 
 static PyObject *
-_hashlib_openssl_shake128(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+_hashlib_openssl_shake_128(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
 {
     PyObject *return_value = NULL;
     static const char * const _keywords[] = {"string", "usedforsecurity", NULL};
-    static _PyArg_Parser _parser = {NULL, _keywords, "openssl_shake128", 0};
+    static _PyArg_Parser _parser = {NULL, _keywords, "openssl_shake_128", 0};
     PyObject *argsbuf[2];
     Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
     PyObject *data_obj = NULL;
@@ -812,7 +812,7 @@ _hashlib_openssl_shake128(PyObject *module, PyObject *const *args, Py_ssize_t na
         goto exit;
     }
 skip_optional_kwonly:
-    return_value = _hashlib_openssl_shake128_impl(module, data_obj, usedforsecurity);
+    return_value = _hashlib_openssl_shake_128_impl(module, data_obj, usedforsecurity);
 
 exit:
     return return_value;
@@ -822,25 +822,25 @@ _hashlib_openssl_shake128(PyObject *module, PyObject *const *args, Py_ssize_t na
 
 #if defined(PY_OPENSSL_HAS_SHAKE)
 
-PyDoc_STRVAR(_hashlib_openssl_shake256__doc__,
-"openssl_shake256($module, /, string=b\'\', *, usedforsecurity=True)\n"
+PyDoc_STRVAR(_hashlib_openssl_shake_256__doc__,
+"openssl_shake_256($module, /, string=b\'\', *, usedforsecurity=True)\n"
 "--\n"
 "\n"
-"Returns a shake256 variable hash object; optionally initialized with a string");
+"Returns a shake-256 variable hash object; optionally initialized with a string");
 
-#define _HASHLIB_OPENSSL_SHAKE256_METHODDEF    \
-    {"openssl_shake256", (PyCFunction)(void(*)(void))_hashlib_openssl_shake256, METH_FASTCALL|METH_KEYWORDS, _hashlib_openssl_shake256__doc__},
+#define _HASHLIB_OPENSSL_SHAKE_256_METHODDEF    \
+    {"openssl_shake_256", (PyCFunction)(void(*)(void))_hashlib_openssl_shake_256, METH_FASTCALL|METH_KEYWORDS, _hashlib_openssl_shake_256__doc__},
 
 static PyObject *
-_hashlib_openssl_shake256_impl(PyObject *module, PyObject *data_obj,
-                               int usedforsecurity);
+_hashlib_openssl_shake_256_impl(PyObject *module, PyObject *data_obj,
+                                int usedforsecurity);
 
 static PyObject *
-_hashlib_openssl_shake256(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+_hashlib_openssl_shake_256(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
 {
     PyObject *return_value = NULL;
     static const char * const _keywords[] = {"string", "usedforsecurity", NULL};
-    static _PyArg_Parser _parser = {NULL, _keywords, "openssl_shake256", 0};
+    static _PyArg_Parser _parser = {NULL, _keywords, "openssl_shake_256", 0};
     PyObject *argsbuf[2];
     Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
     PyObject *data_obj = NULL;
@@ -868,7 +868,7 @@ _hashlib_openssl_shake256(PyObject *module, PyObject *const *args, Py_ssize_t na
         goto exit;
     }
 skip_optional_kwonly:
-    return_value = _hashlib_openssl_shake256_impl(module, data_obj, usedforsecurity);
+    return_value = _hashlib_openssl_shake_256_impl(module, data_obj, usedforsecurity);
 
 exit:
     return return_value;
@@ -1387,13 +1387,13 @@ _hashlib_get_fips_mode(PyObject *module, PyObject *Py_UNUSED(ignored))
     #define _HASHLIB_OPENSSL_SHA3_512_METHODDEF
 #endif /* !defined(_HASHLIB_OPENSSL_SHA3_512_METHODDEF) */
 
-#ifndef _HASHLIB_OPENSSL_SHAKE128_METHODDEF
-    #define _HASHLIB_OPENSSL_SHAKE128_METHODDEF
-#endif /* !defined(_HASHLIB_OPENSSL_SHAKE128_METHODDEF) */
+#ifndef _HASHLIB_OPENSSL_SHAKE_128_METHODDEF
+    #define _HASHLIB_OPENSSL_SHAKE_128_METHODDEF
+#endif /* !defined(_HASHLIB_OPENSSL_SHAKE_128_METHODDEF) */
 
-#ifndef _HASHLIB_OPENSSL_SHAKE256_METHODDEF
-    #define _HASHLIB_OPENSSL_SHAKE256_METHODDEF
-#endif /* !defined(_HASHLIB_OPENSSL_SHAKE256_METHODDEF) */
+#ifndef _HASHLIB_OPENSSL_SHAKE_256_METHODDEF
+    #define _HASHLIB_OPENSSL_SHAKE_256_METHODDEF
+#endif /* !defined(_HASHLIB_OPENSSL_SHAKE_256_METHODDEF) */
 
 #ifndef _HASHLIB_SCRYPT_METHODDEF
     #define _HASHLIB_SCRYPT_METHODDEF
@@ -1402,4 +1402,4 @@ _hashlib_get_fips_mode(PyObject *module, PyObject *Py_UNUSED(ignored))
 #ifndef _HASHLIB_GET_FIPS_MODE_METHODDEF
     #define _HASHLIB_GET_FIPS_MODE_METHODDEF
 #endif /* !defined(_HASHLIB_GET_FIPS_MODE_METHODDEF) */
-/*[clinic end generated code: output=972a198d2e8434bd input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a0bff5dcef88de6a input=a9049054013a1b77]*/



More information about the Python-checkins mailing list