summaryrefslogtreecommitdiff
path: root/src/MD2.c
diff options
context:
space:
mode:
authorLegrandin <gooksankoo@hoiptorrow.mailexpire.com>2011-02-03 01:21:12 +0100
committerLegrandin <gooksankoo@hoiptorrow.mailexpire.com>2011-02-03 01:35:46 +0100
commit0d14809acd61782e1e024ca7119b6e4b10dcf7fc (patch)
tree524a623d95111970732537e1c25f6e1ae0bb8421 /src/MD2.c
parent1a51197542f0e22f145a3ba9cbd090a602e05132 (diff)
downloadpycrypto-0d14809acd61782e1e024ca7119b6e4b10dcf7fc.tar.gz
Add OID to each hash algorithm.
Diffstat (limited to 'src/MD2.c')
-rw-r--r--src/MD2.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/MD2.c b/src/MD2.c
index a3974c6..66e795f 100644
--- a/src/MD2.c
+++ b/src/MD2.c
@@ -33,6 +33,17 @@
#define MODULE_NAME MD2
#define DIGEST_SIZE 16
+/**
+ * id-md2 OBJECT IDENTIFIER ::= {
+ * iso(1) member-body(2) us(840) rsadsi(113549)
+ * digestAlgorithm(2) 2
+ * }
+ */
+static const char md2_oid[] = { 0x06, 0x08, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x02, 0x02 };
+
+#define DER_OID ((void*)&md2_oid)
+#define DER_OID_SIZE (sizeof md2_oid)
+
typedef unsigned char U8;
typedef unsigned int U32;