2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
19 * This is work is derived from material Copyright RSA Data Security, Inc.
21 * The RSA copyright statement and Licence for that original material is
22 * included below. This is followed by the Apache copyright statement and
23 * licence for the modifications made to that material.
26 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
29 License to copy and use this software is granted provided that it
30 is identified as the "RSA Data Security, Inc. MD5 Message-Digest
31 Algorithm" in all material mentioning or referencing this software
34 License is also granted to make and use derivative works provided
35 that such works are identified as "derived from the RSA Data
36 Security, Inc. MD5 Message-Digest Algorithm" in all material
37 mentioning or referencing the derived work.
39 RSA Data Security, Inc. makes no representations concerning either
40 the merchantability of this software or the suitability of this
41 software for any particular purpose. It is provided "as is"
42 without express or implied warranty of any kind.
44 These notices must be retained in any copies of any part of this
45 documentation and/or software.
48 #ifndef JK_APACHE_MD5_H
49 #define JK_APACHE_MD5_H
56 /* MD5.H - header file for MD5.C */
58 #define JK_MD5_DIGESTSIZE 16
63 jk_uint32_t state[4]; /* state (ABCD) */
64 jk_uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */
65 unsigned char buffer[64]; /* input buffer */
69 * Define the Magic String prefix that identifies a password as being
70 * hashed using our algorithm.
72 #define JK_MD5PW_ID "$apr1$"
73 #define JK_MD5PW_IDLEN 6
75 char *JK_METHOD jk_hextocstr(unsigned char *org, char *dst, int n);
76 char *JK_METHOD jk_md5(const unsigned char *org,
77 const unsigned char *org2, char *dst);
84 #endif /* !JK_APACHE_MD5_H */