summaryrefslogtreecommitdiff
path: root/ext/digest/md5/md5cc.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/digest/md5/md5cc.h')
-rw-r--r--ext/digest/md5/md5cc.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/digest/md5/md5cc.h b/ext/digest/md5/md5cc.h
new file mode 100644
index 0000000..63a7ae9
--- /dev/null
+++ b/ext/digest/md5/md5cc.h
@@ -0,0 +1,12 @@
+#define COMMON_DIGEST_FOR_OPENSSL 1
+#include <CommonCrypto/CommonDigest.h>
+
+#define MD5_BLOCK_LENGTH CC_MD5_BLOCK_BYTES
+
+static DEFINE_UPDATE_FUNC_FOR_UINT(MD5);
+static DEFINE_FINISH_FUNC_FROM_FINAL(MD5);
+
+#undef MD5_Update
+#undef MD5_Finish
+#define MD5_Update rb_digest_MD5_update
+#define MD5_Finish rb_digest_MD5_finish