summaryrefslogtreecommitdiff
path: root/ext/digest/rmd160/rmd160ossl.h
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-26 17:26:46 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-26 17:26:46 +0000
commit15d643f44cf786f1b71f837f3d020cbad02ae2f2 (patch)
treecae16074b66b205a837c10061d4b27a5280644f4 /ext/digest/rmd160/rmd160ossl.h
parent965393cbb848ddb869543a5ca8f6e7fba1d0f130 (diff)
* ext/digest/rmd160: Use OpenSSL's RMD160 engine if available. It
is much faster than what we have now (rmd160.[ch]). Add a knob (--with-bundled-rmd160) to extconf.rb which makes it use the bundled one anyway. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/digest/rmd160/rmd160ossl.h')
-rw-r--r--ext/digest/rmd160/rmd160ossl.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/digest/rmd160/rmd160ossl.h b/ext/digest/rmd160/rmd160ossl.h
new file mode 100644
index 00000000000..824a1bf32fc
--- /dev/null
+++ b/ext/digest/rmd160/rmd160ossl.h
@@ -0,0 +1,20 @@
+/* $Id$ */
+
+#ifndef RMD160OSSL_H_INCLUDED
+#define RMD160OSSL_H_INCLUDED
+
+#include <openssl/ripemd.h>
+
+#define RMD160_CTX RIPEMD160_CTX
+
+#define RMD160_Init RIPEMD160_Init
+#define RMD160_Update RIPEMD160_Update
+#define RMD160_Final RIPEMD160_Final
+
+#define RMD160_BLOCK_LENGTH RIPEMD160_CBLOCK
+#define RMD160_DIGEST_LENGTH RIPEMD160_DIGEST_LENGTH
+
+char *RMD160_End(RMD160_CTX *ctx, char *buf);
+int RMD160_Equal(RMD160_CTX *pctx1, RMD160_CTX *pctx2);
+
+#endif