<tr><td><code>unbase64</code></td>
<td>Decode base64 encoded string, return truncated string if 0x00 is
found</td><td></td></tr>
+ <tr><td><code>md5</code></td>
+ <td>Hash the string using MD5, then encode the hash with hexadecimal
+ encoding</td><td></td></tr>
<tr><td><code>sha1</code></td>
<td>Hash the string using SHA1, then encode the hash with hexadecimal
encoding</td><td></td></tr>
#include "http_request.h"
#include "ap_provider.h"
#include "util_expr_private.h"
+#include "util_md5.h"
#include "apr_lib.h"
#include "apr_fnmatch.h"
return out;
}
+static const char *md5_func(ap_expr_eval_ctx_t *ctx, const void *data,
+ const char *arg)
+{
+ return ap_md5(ctx->p, (const unsigned char *)arg);
+}
+
+
#define MAX_FILE_SIZE 10*1024*1024
static const char *file_func(ap_expr_eval_ctx_t *ctx, const void *data,
char *arg)
{ base64_func, "base64", NULL, 0 },
{ unbase64_func, "unbase64", NULL, 0 },
{ sha1_func, "sha1", NULL, 0 },
+ { md5_func, "md5", NULL, 0 },
{ NULL, NULL, NULL}
};