Skip to content

Commit f192aeb

Browse files
srinivasreddyserhiy-storchaka
authored andcommitted
bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873)
1 parent dd13c88 commit f192aeb

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

Modules/_hashopenssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ EVP_copy(EVPobject *self, PyObject *unused)
187187
}
188188

189189
PyDoc_STRVAR(EVP_digest__doc__,
190-
"Return the digest value as a string of binary data.");
190+
"Return the digest value as a bytes object.");
191191

192192
static PyObject *
193193
EVP_digest(EVPobject *self, PyObject *unused)

Modules/clinic/md5module.c.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/clinic/sha1module.c.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/clinic/sha256module.c.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/clinic/sha512module.c.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/md5module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,12 +361,12 @@ MD5Type_copy_impl(MD5object *self)
361361
/*[clinic input]
362362
MD5Type.digest
363363
364-
Return the digest value as a string of binary data.
364+
Return the digest value as a bytes object.
365365
[clinic start generated code]*/
366366

367367
static PyObject *
368368
MD5Type_digest_impl(MD5object *self)
369-
/*[clinic end generated code: output=eb691dc4190a07ec input=7b96e65389412a34]*/
369+
/*[clinic end generated code: output=eb691dc4190a07ec input=bc0c4397c2994be6]*/
370370
{
371371
unsigned char digest[MD5_DIGESTSIZE];
372372
struct md5_state temp;

Modules/sha1module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,12 +338,12 @@ SHA1Type_copy_impl(SHA1object *self)
338338
/*[clinic input]
339339
SHA1Type.digest
340340
341-
Return the digest value as a string of binary data.
341+
Return the digest value as a bytes object.
342342
[clinic start generated code]*/
343343

344344
static PyObject *
345345
SHA1Type_digest_impl(SHA1object *self)
346-
/*[clinic end generated code: output=2f05302a7aa2b5cb input=205d47e1927fd009]*/
346+
/*[clinic end generated code: output=2f05302a7aa2b5cb input=13824b35407444bd]*/
347347
{
348348
unsigned char digest[SHA1_DIGESTSIZE];
349349
struct sha1_state temp;

Modules/sha256module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,12 +428,12 @@ SHA256Type_copy_impl(SHAobject *self)
428428
/*[clinic input]
429429
SHA256Type.digest
430430
431-
Return the digest value as a string of binary data.
431+
Return the digest value as a bytes object.
432432
[clinic start generated code]*/
433433

434434
static PyObject *
435435
SHA256Type_digest_impl(SHAobject *self)
436-
/*[clinic end generated code: output=46616a5e909fbc3d input=1fb752e58954157d]*/
436+
/*[clinic end generated code: output=46616a5e909fbc3d input=f1f4cfea5cbde35c]*/
437437
{
438438
unsigned char digest[SHA_DIGESTSIZE];
439439
SHAobject temp;

Modules/sha512module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,12 +493,12 @@ SHA512Type_copy_impl(SHAobject *self)
493493
/*[clinic input]
494494
SHA512Type.digest
495495
496-
Return the digest value as a string of binary data.
496+
Return the digest value as a bytes object.
497497
[clinic start generated code]*/
498498

499499
static PyObject *
500500
SHA512Type_digest_impl(SHAobject *self)
501-
/*[clinic end generated code: output=1080bbeeef7dde1b input=60c2cede9e023018]*/
501+
/*[clinic end generated code: output=1080bbeeef7dde1b input=f6470dd359071f4b]*/
502502
{
503503
unsigned char digest[SHA_DIGESTSIZE];
504504
SHAobject temp;

0 commit comments

Comments
 (0)