|
Packit |
90a5c9 |
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
Packit |
90a5c9 |
* contributor license agreements. See the NOTICE file distributed with
|
|
Packit |
90a5c9 |
* this work for additional information regarding copyright ownership.
|
|
Packit |
90a5c9 |
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
Packit |
90a5c9 |
* (the "License"); you may not use this file except in compliance with
|
|
Packit |
90a5c9 |
* the License. You may obtain a copy of the License at
|
|
Packit |
90a5c9 |
*
|
|
Packit |
90a5c9 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
Packit |
90a5c9 |
*
|
|
Packit |
90a5c9 |
* Unless required by applicable law or agreed to in writing, software
|
|
Packit |
90a5c9 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
Packit |
90a5c9 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
Packit |
90a5c9 |
* See the License for the specific language governing permissions and
|
|
Packit |
90a5c9 |
* limitations under the License.
|
|
Packit |
90a5c9 |
*/
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/**
|
|
Packit |
90a5c9 |
* @file util_md5.h
|
|
Packit |
90a5c9 |
* @brief Apache MD5 library
|
|
Packit |
90a5c9 |
*
|
|
Packit |
90a5c9 |
* @defgroup APACHE_CORE_MD5 MD5 Package Library
|
|
Packit |
90a5c9 |
* @ingroup APACHE_CORE
|
|
Packit |
90a5c9 |
* @{
|
|
Packit |
90a5c9 |
*/
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#ifndef APACHE_UTIL_MD5_H
|
|
Packit |
90a5c9 |
#define APACHE_UTIL_MD5_H
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#ifdef __cplusplus
|
|
Packit |
90a5c9 |
extern "C" {
|
|
Packit |
90a5c9 |
#endif
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#include "apr_md5.h"
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/**
|
|
Packit |
90a5c9 |
* Create an MD5 checksum of a given string.
|
|
Packit |
90a5c9 |
* @param a Pool to allocate out of
|
|
Packit |
90a5c9 |
* @param string String to get the checksum of
|
|
Packit |
90a5c9 |
* @return The checksum
|
|
Packit |
90a5c9 |
*/
|
|
Packit |
90a5c9 |
AP_DECLARE(char *) ap_md5(apr_pool_t *a, const unsigned char *string);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/**
|
|
Packit |
90a5c9 |
* Create an MD5 checksum of a string of binary data.
|
|
Packit |
90a5c9 |
* @param a Pool to allocate out of
|
|
Packit |
90a5c9 |
* @param buf Buffer to generate checksum for
|
|
Packit |
90a5c9 |
* @param len The length of the buffer
|
|
Packit |
90a5c9 |
* @return The checksum
|
|
Packit |
90a5c9 |
*/
|
|
Packit |
90a5c9 |
AP_DECLARE(char *) ap_md5_binary(apr_pool_t *a, const unsigned char *buf, int len);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/**
|
|
Packit |
90a5c9 |
* Convert an MD5 checksum into a base64 encoding.
|
|
Packit |
90a5c9 |
* @param p The pool to allocate out of
|
|
Packit |
90a5c9 |
* @param context The context to convert
|
|
Packit |
90a5c9 |
* @return The converted encoding
|
|
Packit |
90a5c9 |
*/
|
|
Packit |
90a5c9 |
AP_DECLARE(char *) ap_md5contextTo64(apr_pool_t *p, apr_md5_ctx_t *context);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/**
|
|
Packit |
90a5c9 |
* Create an MD5 Digest for a given file.
|
|
Packit |
90a5c9 |
* @param p The pool to allocate out of
|
|
Packit |
90a5c9 |
* @param infile The file to create the digest for
|
|
Packit |
90a5c9 |
*/
|
|
Packit |
90a5c9 |
AP_DECLARE(char *) ap_md5digest(apr_pool_t *p, apr_file_t *infile);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#ifdef __cplusplus
|
|
Packit |
90a5c9 |
}
|
|
Packit |
90a5c9 |
#endif
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#endif /* !APACHE_UTIL_MD5_H */
|
|
Packit |
90a5c9 |
/** @} */
|