]> granicus.if.org Git - apache/blob - include/util_md5.h
update transformation
[apache] / include / util_md5.h
1 /* Copyright 1999-2004 The Apache Software Foundation
2  *
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
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
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.
14  */
15
16 #ifndef APACHE_UTIL_MD5_H
17 #define APACHE_UTIL_MD5_H
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 /**
24  * @package Apache MD5 library
25  */
26
27 #include "apr_md5.h"
28
29 /**
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)
35  */
36 AP_DECLARE(char *) ap_md5(apr_pool_t *a, const unsigned char *string);
37
38 /**
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)
45  */
46 AP_DECLARE(char *) ap_md5_binary(apr_pool_t *a, const unsigned char *buf, int len);
47
48 /**
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)
54  */
55 AP_DECLARE(char *) ap_md5contextTo64(apr_pool_t *p, apr_md5_ctx_t *context);
56
57 /**
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)
62  */
63 AP_DECLARE(char *) ap_md5digest(apr_pool_t *p, apr_file_t *infile);
64
65 #ifdef __cplusplus
66 }
67 #endif
68
69 #endif  /* !APACHE_UTIL_MD5_H */