Skip to content

Commit

Permalink
bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873)
Browse files Browse the repository at this point in the history
  • Loading branch information
srinivasreddy authored and serhiy-storchaka committed Oct 19, 2018
1 parent dd13c88 commit f192aeb
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Modules/_hashopenssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,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)
Expand Down
4 changes: 2 additions & 2 deletions Modules/clinic/md5module.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Modules/clinic/sha1module.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Modules/clinic/sha256module.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Modules/clinic/sha512module.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Modules/md5module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions Modules/sha1module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions Modules/sha256module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions Modules/sha512module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f192aeb

Please sign in to comment.