| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -233,9 +233,9 @@ def check_blocksize_name(self, name, block_size=0, digest_size=0): | |||
| 233 | 233 | self.assertEqual(m.block_size, block_size) | |
| 234 | 234 | self.assertEqual(m.digest_size, digest_size) | |
| 235 | 235 | self.assertEqual(len(m.digest()), digest_size) | |
| 236 | - self.assertEqual(m.name.lower(), name.lower()) | ||
| 236 | + self.assertEqual(m.name, name) | ||
| 237 | 237 | # split for sha3_512 / _sha3.sha3 object | |
| 238 | - self.assertIn(name.split("_")[0], repr(m).lower()) | ||
| 238 | + self.assertIn(name.split("_")[0], repr(m)) | ||
| 239 | 239 | ||
| 240 | 240 | def test_blocksize_name(self): | |
| 241 | 241 | self.check_blocksize_name('md5', 64, 16) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -28,6 +28,9 @@ Core and Builtins | |||
| 28 | 28 | Library | |
| 29 | 29 | ------- | |
| 30 | 30 | ||
| 31 | + - Issue #18532: Change the builtin hash algorithms' names to lower case names | ||
| 32 | + as promised by hashlib's documentation. | ||
| 33 | + | ||
| 31 | 34 | - Issue #18405: Improve the entropy of crypt.mksalt(). | |
| 32 | 35 | ||
| 33 | 36 | - Issue #12015: The tempfile module now uses a suffix of 8 random characters | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -439,7 +439,7 @@ MD5_get_block_size(PyObject *self, void *closure) | |||
| 439 | 439 | static PyObject * | |
| 440 | 440 | MD5_get_name(PyObject *self, void *closure) | |
| 441 | 441 | { | |
| 442 | - return PyUnicode_FromStringAndSize("MD5", 3); | ||
| 442 | + return PyUnicode_FromStringAndSize("md5", 3); | ||
| 443 | 443 | } | |
| 444 | 444 | ||
| 445 | 445 | static PyObject * | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -411,7 +411,7 @@ SHA1_get_block_size(PyObject *self, void *closure) | |||
| 411 | 411 | static PyObject * | |
| 412 | 412 | SHA1_get_name(PyObject *self, void *closure) | |
| 413 | 413 | { | |
| 414 | - return PyUnicode_FromStringAndSize("SHA1", 4); | ||
| 414 | + return PyUnicode_FromStringAndSize("sha1", 4); | ||
| 415 | 415 | } | |
| 416 | 416 | ||
| 417 | 417 | static PyObject * | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -501,9 +501,9 @@ static PyObject * | |||
| 501 | 501 | SHA256_get_name(PyObject *self, void *closure) | |
| 502 | 502 | { | |
| 503 | 503 | if (((SHAobject *)self)->digestsize == 32) | |
| 504 | - return PyUnicode_FromStringAndSize("SHA256", 6); | ||
| 504 | + return PyUnicode_FromStringAndSize("sha256", 6); | ||
| 505 | 505 | else | |
| 506 | - return PyUnicode_FromStringAndSize("SHA224", 6); | ||
| 506 | + return PyUnicode_FromStringAndSize("sha224", 6); | ||
| 507 | 507 | } | |
| 508 | 508 | ||
| 509 | 509 | static PyGetSetDef SHA_getseters[] = { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -567,9 +567,9 @@ static PyObject * | |||
| 567 | 567 | SHA512_get_name(PyObject *self, void *closure) | |
| 568 | 568 | { | |
| 569 | 569 | if (((SHAobject *)self)->digestsize == 64) | |
| 570 | - return PyUnicode_FromStringAndSize("SHA512", 6); | ||
| 570 | + return PyUnicode_FromStringAndSize("sha512", 6); | ||
| 571 | 571 | else | |
| 572 | - return PyUnicode_FromStringAndSize("SHA384", 6); | ||
| 572 | + return PyUnicode_FromStringAndSize("sha384", 6); | ||
| 573 | 573 | } | |
| 574 | 574 | ||
| 575 | 575 | static PyGetSetDef SHA_getseters[] = { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments