diff options
author | Igor Sysoev <igor@sysoev.ru> | 2011-04-15 19:58:06 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2011-04-15 19:58:06 +0400 |
commit | b3451785fe85ff56e4aa52a50a202ec7239264b8 (patch) | |
tree | 3c4a227a08a420d574ad48af741ead2e6fc82a91 /src/core/ngx_md5.h | |
parent | 9813a1999c0297210785c064ea2a02a064d58900 (diff) |
an internal MD5 implemenation
patch by Maxim Dounin
Diffstat (limited to 'src/core/ngx_md5.h')
-rw-r--r-- | src/core/ngx_md5.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/core/ngx_md5.h b/src/core/ngx_md5.h index f2e99bc98..93fa25d1a 100644 --- 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_ */ |