summaryrefslogtreecommitdiff
path: root/src/hash_template.c
diff options
context:
space:
mode:
authorLegrandin <gooksankoo@hoiptorrow.mailexpire.com>2011-10-16 22:41:21 +0200
committerLegrandin <gooksankoo@hoiptorrow.mailexpire.com>2011-10-16 22:41:21 +0200
commit897b75983c31a9e2630af92161e6206c2480685e (patch)
treeee73668ae2862dd828fd39c7bf41e4dbc10a1e09 /src/hash_template.c
parente05362993e34be982bd08e5ffd076c3e4a351232 (diff)
downloadpycrypto-897b75983c31a9e2630af92161e6206c2480685e.tar.gz
Added Lorenz Quack's native C implementation of all SHA-2 algorithm
(as submitted here https://bugs.launchpad.net/pycrypto/+bug/544792) so that they are available also in Python 2.1, 2.2, 2.3 and 2.4. Regardless where the implementation comes from (Python standard library or our native modules, depending on the Python version), all Crypto.Hash objects are always used as front-ends.
Diffstat (limited to 'src/hash_template.c')
-rw-r--r--src/hash_template.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/hash_template.c b/src/hash_template.c
index 9fd130b..d0af39d 100644
--- a/src/hash_template.c
+++ b/src/hash_template.c
@@ -171,18 +171,11 @@ static PyMethodDef ALG_methods[] = {
{NULL, NULL} /* sentinel */
};
-#ifndef DER_OID
-#define DER_OID ""
-#define DER_OID_SIZE 0
-#endif
-
static PyObject *
ALG_getattr(PyObject *self, char *name)
{
if (strcmp(name, "digest_size")==0)
return PyInt_FromLong(DIGEST_SIZE);
- if (strcmp(name, "oid")==0)
- return PyString_FromStringAndSize(DER_OID, DER_OID_SIZE);
return Py_FindMethod(ALG_methods, self, name);
}