summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-08-15 16:31:48 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-08-15 16:31:48 (GMT)
commit37d5cebb4816a96785a85db9dcfd8519f30df18b (patch)
treeba564ce5b55484586db9790b772f5512890bf900 /Modules
parentf0e521036caea5083e93cd5eca5500b9a1e945ad (diff)
downloadcpython-37d5cebb4816a96785a85db9dcfd8519f30df18b.zip
cpython-37d5cebb4816a96785a85db9dcfd8519f30df18b.tar.gz
cpython-37d5cebb4816a96785a85db9dcfd8519f30df18b.tar.bz2
Change the builtin hash algorithms' names to lower case names
as promised by hashlib's documentation.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/md5module.c2
-rw-r--r--Modules/sha1module.c2
-rw-r--r--Modules/sha256module.c4
-rw-r--r--Modules/sha512module.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/Modules/md5module.c b/Modules/md5module.c
index 7dc38ea..bb91b6c 100644
--- a/Modules/md5module.c
+++ b/Modules/md5module.c
@@ -439,7 +439,7 @@ MD5_get_block_size(PyObject *self, void *closure)
static PyObject *
MD5_get_name(PyObject *self, void *closure)
{
- return PyUnicode_FromStringAndSize("MD5", 3);
+ return PyUnicode_FromStringAndSize("md5", 3);
}
static PyObject *
diff --git a/Modules/sha1module.c b/Modules/sha1module.c
index e7c7ea6..403194c 100644
--- a/Modules/sha1module.c
+++ b/Modules/sha1module.c
@@ -411,7 +411,7 @@ SHA1_get_block_size(PyObject *self, void *closure)
static PyObject *
SHA1_get_name(PyObject *self, void *closure)
{
- return PyUnicode_FromStringAndSize("SHA1", 4);
+ return PyUnicode_FromStringAndSize("sha1", 4);
}
static PyObject *
diff --git a/Modules/sha256module.c b/Modules/sha256module.c
index 767bfac..e60111a 100644
--- a/Modules/sha256module.c
+++ b/Modules/sha256module.c
@@ -501,9 +501,9 @@ static PyObject *
SHA256_get_name(PyObject *self, void *closure)
{
if (((SHAobject *)self)->digestsize == 32)
- return PyUnicode_FromStringAndSize("SHA256", 6);
+ return PyUnicode_FromStringAndSize("sha256", 6);
else
- return PyUnicode_FromStringAndSize("SHA224", 6);
+ return PyUnicode_FromStringAndSize("sha224", 6);
}
static PyGetSetDef SHA_getseters[] = {
diff --git a/Modules/sha512module.c b/Modules/sha512module.c
index 66c2c49..2841eab 100644
--- a/Modules/sha512module.c
+++ b/Modules/sha512module.c
@@ -567,9 +567,9 @@ static PyObject *
SHA512_get_name(PyObject *self, void *closure)
{
if (((SHAobject *)self)->digestsize == 64)
- return PyUnicode_FromStringAndSize("SHA512", 6);
+ return PyUnicode_FromStringAndSize("sha512", 6);
else
- return PyUnicode_FromStringAndSize("SHA384", 6);
+ return PyUnicode_FromStringAndSize("sha384", 6);
}
static PyGetSetDef SHA_getseters[] = {