diff src/core/ngx_md5.h @ 3895:b659514a3948

an internal MD5 implemenation patch by Maxim Dounin
author Igor Sysoev <igor@sysoev.ru>
date Fri, 15 Apr 2011 15:58:06 +0000
parents 27d4ed42e49d
children 38e6f45c5e3d
line wrap: on
line diff
--- a/src/core/ngx_md5.h
+++ b/src/core/ngx_md5.h
@@ -12,6 +12,8 @@
 #include <ngx_core.h>
 
 
+#if (NGX_HAVE_MD5)
+
 #if (NGX_HAVE_OPENSSL_MD5_H)
 #include <openssl/md5.h>
 #else
@@ -37,4 +39,21 @@ typedef MD5_CTX  ngx_md5_t;
 #endif
 
 
+#else /* !NGX_HAVE_MD5 */
+
+
+typedef struct {
+    uint64_t  bytes;
+    uint32_t  a, b, c, d;
+    u_char    buffer[64];
+} ngx_md5_t;
+
+
+void ngx_md5_init(ngx_md5_t *ctx);
+void ngx_md5_update(ngx_md5_t *ctx, const u_char *data, size_t size);
+void ngx_md5_final(u_char result[16], ngx_md5_t *ctx);
+
+
+#endif
+
 #endif /* _NGX_MD5_H_INCLUDED_ */