Apache Portable Runtime Utility Library
apr_md4.h
Go to the documentation of this file.
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements. See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 /* This is derived from material copyright RSA Data Security, Inc.
17  * Their notice is reproduced below in its entirety.
18  *
19  * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
20  * rights reserved.
21  *
22  * License to copy and use this software is granted provided that it
23  * is identified as the "RSA Data Security, Inc. MD4 Message-Digest
24  * Algorithm" in all material mentioning or referencing this software
25  * or this function.
26  *
27  * License is also granted to make and use derivative works provided
28  * that such works are identified as "derived from the RSA Data
29  * Security, Inc. MD4 Message-Digest Algorithm" in all material
30  * mentioning or referencing the derived work.
31  *
32  * RSA Data Security, Inc. makes no representations concerning either
33  * the merchantability of this software or the suitability of this
34  * software for any particular purpose. It is provided "as is"
35  * without express or implied warranty of any kind.
36  *
37  * These notices must be retained in any copies of any part of this
38  * documentation and/or software.
39  */
40 
41 #ifndef APR_MD4_H
42 #define APR_MD4_H
43 
44 #include "apu.h"
45 #include "apr_xlate.h"
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
61 #define APR_MD4_DIGESTSIZE 16
62 
65 
67 struct apr_md4_ctx_t {
69  apr_uint32_t state[4];
71  apr_uint32_t count[2];
73  unsigned char buffer[64];
74 #if APR_HAS_XLATE
75 
77 #endif
78 };
79 
84 APU_DECLARE(apr_status_t) apr_md4_init(apr_md4_ctx_t *context);
85 
86 #if APR_HAS_XLATE
87 
93 APU_DECLARE(apr_status_t) apr_md4_set_xlate(apr_md4_ctx_t *context,
94  apr_xlate_t *xlate);
95 #else
96 #define apr_md4_set_xlate(context, xlate) APR_ENOTIMPL
97 #endif
98 
106 APU_DECLARE(apr_status_t) apr_md4_update(apr_md4_ctx_t *context,
107  const unsigned char *input,
108  apr_size_t inputLen);
109 
116 APU_DECLARE(apr_status_t) apr_md4_final(
117  unsigned char digest[APR_MD4_DIGESTSIZE],
118  apr_md4_ctx_t *context);
119 
126 APU_DECLARE(apr_status_t) apr_md4(unsigned char digest[APR_MD4_DIGESTSIZE],
127  const unsigned char *input,
128  apr_size_t inputLen);
129 
131 #ifdef __cplusplus
132 }
133 #endif
134 
135 #endif /* !APR_MD4_H */
Definition: apr_md4.h:67
#define APR_MD4_DIGESTSIZE
Definition: apr_md4.h:61
unsigned char buffer[64]
Definition: apr_md4.h:73
apr_status_t apr_md4(unsigned char digest[APR_MD4_DIGESTSIZE], const unsigned char *input, apr_size_t inputLen)
apr_status_t apr_md4_final(unsigned char digest[APR_MD4_DIGESTSIZE], apr_md4_ctx_t *context)
struct apr_xlate_t apr_xlate_t
Definition: apr_xlate.h:39
apr_status_t apr_md4_init(apr_md4_ctx_t *context)
apr_xlate_t * xlate
Definition: apr_md4.h:76
APR I18N translation library.
apr_status_t apr_md4_update(apr_md4_ctx_t *context, const unsigned char *input, apr_size_t inputLen)
apr_uint32_t state[4]
Definition: apr_md4.h:69
apr_uint32_t count[2]
Definition: apr_md4.h:71
apr_status_t apr_md4_set_xlate(apr_md4_ctx_t *context, apr_xlate_t *xlate)