aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_string.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-12-17 21:06:17 +0000
committerIgor Sysoev <igor@sysoev.ru>2007-12-17 21:06:17 +0000
commita03fa3666f8b01211535eebac162f6ec54dd6b82 (patch)
tree7f7de91657fd8bbe40c5e329b3488dd6a1fc4b78 /src/core/ngx_string.c
parent249cbe75b44dd14fab41217377bdc45032762f6f (diff)
downloadnginx-a03fa3666f8b01211535eebac162f6ec54dd6b82.tar.gz
nginx-a03fa3666f8b01211535eebac162f6ec54dd6b82.zip
replace ngx_md5_text() with ngx_hex_dump()
Diffstat (limited to 'src/core/ngx_string.c')
-rw-r--r--src/core/ngx_string.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c
index 2eaffd60d..f878c559f 100644
--- a/src/core/ngx_string.c
+++ b/src/core/ngx_string.c
@@ -816,18 +816,17 @@ ngx_hextoi(u_char *line, size_t n)
}
-void
-ngx_md5_text(u_char *text, u_char *md5)
+u_char *
+ngx_hex_dump(u_char *dst, u_char *src, size_t len)
{
- int i;
static u_char hex[] = "0123456789abcdef";
- for (i = 0; i < 16; i++) {
- *text++ = hex[md5[i] >> 4];
- *text++ = hex[md5[i] & 0xf];
+ while (len--) {
+ *dst++ = hex[*src >> 4];
+ *dst++ = hex[*src++ & 0xf];
}
- *text = '\0';
+ return dst;
}