]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.6] bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873). (GH...
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 28 Oct 2018 17:20:30 +0000 (19:20 +0200)
committerGitHub <noreply@github.com>
Sun, 28 Oct 2018 17:20:30 +0000 (19:20 +0200)
(cherry picked from commit f192aeb95a139ede74d69e39c046c498ff288a37)

Co-authored-by: Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి) <srinivasreddy@users.noreply.github.com>
Modules/_hashopenssl.c
Modules/clinic/md5module.c.h
Modules/clinic/sha1module.c.h
Modules/clinic/sha256module.c.h
Modules/clinic/sha512module.c.h
Modules/md5module.c
Modules/sha1module.c
Modules/sha256module.c
Modules/sha512module.c

index 9e3a286896085e044984c2bb37bce3cd73730824..84edd72c85a36d2190480833c3a31baa54a7a802 100644 (file)
@@ -192,7 +192,7 @@ EVP_copy(EVPobject *self, PyObject *unused)
 }
 
 PyDoc_STRVAR(EVP_digest__doc__,
-"Return the digest value as a string of binary data.");
+"Return the digest value as a bytes object.");
 
 static PyObject *
 EVP_digest(EVPobject *self, PyObject *unused)
index a841fe57867827f458a9d5e4b4b941e69d4d925a..8a1086098ec5b46c7b3530488c607e667c7296b3 100644 (file)
@@ -24,7 +24,7 @@ PyDoc_STRVAR(MD5Type_digest__doc__,
 "digest($self, /)\n"
 "--\n"
 "\n"
-"Return the digest value as a string of binary data.");
+"Return the digest value as a bytes object.");
 
 #define MD5TYPE_DIGEST_METHODDEF    \
     {"digest", (PyCFunction)MD5Type_digest, METH_NOARGS, MD5Type_digest__doc__},
@@ -94,4 +94,4 @@ _md5_md5(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
 exit:
     return return_value;
 }
-/*[clinic end generated code: output=54cd50db050f2589 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=1761d10cec19a4c2 input=a9049054013a1b77]*/
index b08e92d09997d608b80394f656e9236483cc5f50..71b4a3482845855fb41f22012c577ad214f31873 100644 (file)
@@ -24,7 +24,7 @@ PyDoc_STRVAR(SHA1Type_digest__doc__,
 "digest($self, /)\n"
 "--\n"
 "\n"
-"Return the digest value as a string of binary data.");
+"Return the digest value as a bytes object.");
 
 #define SHA1TYPE_DIGEST_METHODDEF    \
     {"digest", (PyCFunction)SHA1Type_digest, METH_NOARGS, SHA1Type_digest__doc__},
@@ -94,4 +94,4 @@ _sha1_sha1(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwname
 exit:
     return return_value;
 }
-/*[clinic end generated code: output=1430450f3f806895 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=34e9cee5761f2a36 input=a9049054013a1b77]*/
index 115db500f4d3d59680f97ce93f3b570ebccbb95d..bf609bec2bded4b7c862b462257f7d1bf3d45b58 100644 (file)
@@ -24,7 +24,7 @@ PyDoc_STRVAR(SHA256Type_digest__doc__,
 "digest($self, /)\n"
 "--\n"
 "\n"
-"Return the digest value as a string of binary data.");
+"Return the digest value as a bytes object.");
 
 #define SHA256TYPE_DIGEST_METHODDEF    \
     {"digest", (PyCFunction)SHA256Type_digest, METH_NOARGS, SHA256Type_digest__doc__},
@@ -124,4 +124,4 @@ _sha256_sha224(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kw
 exit:
     return return_value;
 }
-/*[clinic end generated code: output=19439d70db7ead5c input=a9049054013a1b77]*/
+/*[clinic end generated code: output=3babbe1e753c1a38 input=a9049054013a1b77]*/
index a2b57f71b5de46ddb6084b4f6d9508a5bad8b6f4..264c9f43253c6a8c662447fe28f054778c5169d9 100644 (file)
@@ -24,7 +24,7 @@ PyDoc_STRVAR(SHA512Type_digest__doc__,
 "digest($self, /)\n"
 "--\n"
 "\n"
-"Return the digest value as a string of binary data.");
+"Return the digest value as a bytes object.");
 
 #define SHA512TYPE_DIGEST_METHODDEF    \
     {"digest", (PyCFunction)SHA512Type_digest, METH_NOARGS, SHA512Type_digest__doc__},
@@ -124,4 +124,4 @@ _sha512_sha384(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kw
 exit:
     return return_value;
 }
-/*[clinic end generated code: output=18f15598c3487045 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=59a43fa6eb3b5f4f input=a9049054013a1b77]*/
index 01d2118339e3dd563445816d6eb90ac436279f71..5d46c68eeeeac6f99c7a9c45666aba5a957c8979 100644 (file)
@@ -361,12 +361,12 @@ MD5Type_copy_impl(MD5object *self)
 /*[clinic input]
 MD5Type.digest
 
-Return the digest value as a string of binary data.
+Return the digest value as a bytes object.
 [clinic start generated code]*/
 
 static PyObject *
 MD5Type_digest_impl(MD5object *self)
-/*[clinic end generated code: output=eb691dc4190a07ec input=7b96e65389412a34]*/
+/*[clinic end generated code: output=eb691dc4190a07ec input=bc0c4397c2994be6]*/
 {
     unsigned char digest[MD5_DIGESTSIZE];
     struct md5_state temp;
index cd123586264c8e66025860341d16cd0eedac48bc..f58d7e4c74bbb3195f0ea7be94ac19f5892aadeb 100644 (file)
@@ -338,12 +338,12 @@ SHA1Type_copy_impl(SHA1object *self)
 /*[clinic input]
 SHA1Type.digest
 
-Return the digest value as a string of binary data.
+Return the digest value as a bytes object.
 [clinic start generated code]*/
 
 static PyObject *
 SHA1Type_digest_impl(SHA1object *self)
-/*[clinic end generated code: output=2f05302a7aa2b5cb input=205d47e1927fd009]*/
+/*[clinic end generated code: output=2f05302a7aa2b5cb input=13824b35407444bd]*/
 {
     unsigned char digest[SHA1_DIGESTSIZE];
     struct sha1_state temp;
index 70c49b5da2ee7c5dfb4dcc0c6d1450b1aeddc0a3..ecd98e6838c7eaaea31684480418d16b540e2594 100644 (file)
@@ -428,12 +428,12 @@ SHA256Type_copy_impl(SHAobject *self)
 /*[clinic input]
 SHA256Type.digest
 
-Return the digest value as a string of binary data.
+Return the digest value as a bytes object.
 [clinic start generated code]*/
 
 static PyObject *
 SHA256Type_digest_impl(SHAobject *self)
-/*[clinic end generated code: output=46616a5e909fbc3d input=1fb752e58954157d]*/
+/*[clinic end generated code: output=46616a5e909fbc3d input=f1f4cfea5cbde35c]*/
 {
     unsigned char digest[SHA_DIGESTSIZE];
     SHAobject temp;
index da0cb5775edbe3afba52c76904238852ddf9c080..891493c2c7031da0b94deb4eba02c8f87f0e2671 100644 (file)
@@ -493,12 +493,12 @@ SHA512Type_copy_impl(SHAobject *self)
 /*[clinic input]
 SHA512Type.digest
 
-Return the digest value as a string of binary data.
+Return the digest value as a bytes object.
 [clinic start generated code]*/
 
 static PyObject *
 SHA512Type_digest_impl(SHAobject *self)
-/*[clinic end generated code: output=1080bbeeef7dde1b input=60c2cede9e023018]*/
+/*[clinic end generated code: output=1080bbeeef7dde1b input=f6470dd359071f4b]*/
 {
     unsigned char digest[SHA_DIGESTSIZE];
     SHAobject temp;