1 /* Copyright 1999-2004 The Apache Software Foundation
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 #ifndef APACHE_UTIL_MD5_H
17 #define APACHE_UTIL_MD5_H
24 * @package Apache MD5 library
30 * Create an MD5 checksum of a given string
31 * @param a Pool to allocate out of
32 * @param string String to get the checksum of
33 * @return The checksum
34 * @deffunc char *ap_md5(apr_pool_t *a, const unsigned char *string)
36 AP_DECLARE(char *) ap_md5(apr_pool_t *a, const unsigned char *string);
39 * Create an MD5 checksum of a string of binary data
40 * @param a Pool to allocate out of
41 * @param buf Buffer to generate checksum for
42 * @param len The length of the buffer
43 * @return The checksum
44 * @deffunc char *ap_md5_binary(apr_pool_t *a, const unsigned char *buf, int len)
46 AP_DECLARE(char *) ap_md5_binary(apr_pool_t *a, const unsigned char *buf, int len);
49 * Convert an MD5 checksum into a base64 encoding
50 * @param p The pool to allocate out of
51 * @param context The context to convert
52 * @return The converted encoding
53 * @deffunc char *ap_md5contextTo64(apr_pool_t *p, apr_md5_ctx_t *context)
55 AP_DECLARE(char *) ap_md5contextTo64(apr_pool_t *p, apr_md5_ctx_t *context);
58 * Create an MD5 Digest for a given file
59 * @param p The pool to allocate out of
60 * @param infile The file to create the digest for
61 * @deffunc char *ap_md5digest(apr_pool_t *p, apr_file_t *infile)
63 AP_DECLARE(char *) ap_md5digest(apr_pool_t *p, apr_file_t *infile);
69 #endif /* !APACHE_UTIL_MD5_H */