summaryrefslogtreecommitdiff
path: root/src/SHA512.c
diff options
context:
space:
mode:
authorDwayne Litzenberger <dlitz@dlitz.net>2013-02-17 11:21:28 -0800
committerDwayne Litzenberger <dlitz@dlitz.net>2013-02-17 19:00:50 -0800
commit59018ff99c97261f9bbaee33f919938871e05118 (patch)
treea07cdc2d6404d983314e1b5cbae78757e5a7a9be /src/SHA512.c
parent4e4cc0beefbb316db2a8750e747e697df0b754d7 (diff)
downloadpycrypto-59018ff99c97261f9bbaee33f919938871e05118.tar.gz
Hash: Remove "oid" attributes; add "name" attribute
In PyCrypto v2.5, the "oid" attribute was added to hash objects. In retrospect, this was not a good idea, since the OID is not really a property of the hash algorithm, it's a protocol-specific identifer for the hash functions. PKCS#1 v1.5 uses it, but other protocols (e.g. OpenPGP, DNSSEC, SSH, etc.) use different identifiers, and it doesn't make sense to add these to Crypto.Hash.* every time a new algorithm is added. This also has the benefit of being compatible with the Python standard library's "hashlib" objects, which also have a name attribute.
Diffstat (limited to 'src/SHA512.c')
-rw-r--r--src/SHA512.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/SHA512.c b/src/SHA512.c
index 3370e8e..3b227ab 100644
--- a/src/SHA512.c
+++ b/src/SHA512.c
@@ -28,6 +28,7 @@
*/
#define MODULE_NAME _SHA512
+#define ALGORITHM_NAME "SHA512"
#define DIGEST_SIZE (512/8)
#define BLOCK_SIZE (1024/8)
#define WORD_SIZE 8