Main Page | Modules | Namespace List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

apr_md4.h

Go to the documentation of this file.
00001 /* Copyright 2001-2004 The Apache Software Foundation
00002  *
00003  * Licensed under the Apache License, Version 2.0 (the "License");
00004  * you may not use this file except in compliance with the License.
00005  * You may obtain a copy of the License at
00006  *
00007  *     http://www.apache.org/licenses/LICENSE-2.0
00008  *
00009  * Unless required by applicable law or agreed to in writing, software
00010  * distributed under the License is distributed on an "AS IS" BASIS,
00011  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00012  * See the License for the specific language governing permissions and
00013  * limitations under the License.
00014  */
00015 /* This is derived from material copyright RSA Data Security, Inc.
00016  * Their notice is reproduced below in its entirety.
00017  *
00018  * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
00019  * rights reserved.
00020  *
00021  * License to copy and use this software is granted provided that it
00022  * is identified as the "RSA Data Security, Inc. MD4 Message-Digest
00023  * Algorithm" in all material mentioning or referencing this software
00024  * or this function.
00025  *
00026  * License is also granted to make and use derivative works provided
00027  * that such works are identified as "derived from the RSA Data
00028  * Security, Inc. MD4 Message-Digest Algorithm" in all material
00029  * mentioning or referencing the derived work.
00030  *
00031  * RSA Data Security, Inc. makes no representations concerning either
00032  * the merchantability of this software or the suitability of this
00033  * software for any particular purpose. It is provided "as is"
00034  * without express or implied warranty of any kind.
00035  *
00036  * These notices must be retained in any copies of any part of this
00037  * documentation and/or software.
00038  */
00039 
00040 #ifndef APR_MD4_H
00041 #define APR_MD4_H
00042 
00043 #include "apu.h"
00044 #include "apr_xlate.h"
00049 #ifdef __cplusplus
00050 extern "C" {
00051 #endif
00052 
00060 #define APR_MD4_DIGESTSIZE 16
00061 
00063 typedef struct apr_md4_ctx_t apr_md4_ctx_t;
00064 
00066 struct apr_md4_ctx_t {
00068     apr_uint32_t state[4];
00070     apr_uint32_t count[2];
00072     unsigned char buffer[64];
00073 #if APR_HAS_XLATE
00074 
00075     apr_xlate_t *xlate;
00076 #endif
00077 };
00078 
00083 APU_DECLARE(apr_status_t) apr_md4_init(apr_md4_ctx_t *context);
00084 
00085 #if APR_HAS_XLATE
00092 APU_DECLARE(apr_status_t) apr_md4_set_xlate(apr_md4_ctx_t *context,
00093                                             apr_xlate_t *xlate);
00094 #else
00095 #define apr_md4_set_xlate(context, xlate) APR_ENOTIMPL
00096 #endif
00097 
00105 APU_DECLARE(apr_status_t) apr_md4_update(apr_md4_ctx_t *context,
00106                                          const unsigned char *input,
00107                                          apr_size_t inputLen);
00108 
00115 APU_DECLARE(apr_status_t) apr_md4_final(
00116                                     unsigned char digest[APR_MD4_DIGESTSIZE],
00117                                     apr_md4_ctx_t *context);
00118 
00125 APU_DECLARE(apr_status_t) apr_md4(unsigned char digest[APR_MD4_DIGESTSIZE],
00126                                   const unsigned char *input,
00127                                   apr_size_t inputLen);
00128 
00130 #ifdef __cplusplus
00131 }
00132 #endif
00133 
00134 #endif /* !APR_MD4_H */

Generated on Thu Sep 8 12:16:02 2005 for Apache Portable Runtime Utility Library by  doxygen 1.4.4