3 * ====================================================================
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
20 * ====================================================================
23 * @file svn_pseudo_md5.h
24 * @brief Subversion hash sum calculation for runtime data (only)
27 #ifndef SVN_PSEUDO_MD5_H
28 #define SVN_PSEUDO_MD5_H
30 #include <apr.h> /* for apr_uint32_t */
34 #endif /* __cplusplus */
38 * Calculates a hash sum for 15 bytes in @a x and returns it in @a digest.
39 * The most significant byte in @a x must be 0 (independent of being on a
40 * little or big endian machine).
42 * @note Use for runtime data hashing only.
44 * @note The output is NOT an MD5 digest shares has the same basic
45 * cryptographic properties. Collisions with proper MD5 on the same
46 * or other input data is equally unlikely as any MD5 collision.
48 void svn__pseudo_md5_15(apr_uint32_t digest[4],
49 const apr_uint32_t x[4]);
52 * Calculates a hash sum for 31 bytes in @a x and returns it in @a digest.
53 * The most significant byte in @a x must be 0 (independent of being on a
54 * little or big endian machine).
56 * @note Use for runtime data hashing only.
58 * @note The output is NOT an MD5 digest shares has the same basic
59 * cryptographic properties. Collisions with proper MD5 on the same
60 * or other input data is equally unlikely as any MD5 collision.
62 void svn__pseudo_md5_31(apr_uint32_t digest[4],
63 const apr_uint32_t x[8]);
66 * Calculates a hash sum for 63 bytes in @a x and returns it in @a digest.
67 * The most significant byte in @a x must be 0 (independent of being on a
68 * little or big endian machine).
70 * @note Use for runtime data hashing only.
72 * @note The output is NOT an MD5 digest shares has the same basic
73 * cryptographic properties. Collisions with proper MD5 on the same
74 * or other input data is equally unlikely as any MD5 collision.
76 void svn__pseudo_md5_63(apr_uint32_t digest[4],
77 const apr_uint32_t x[16]);
81 #endif /* __cplusplus */
83 #endif /* SVN_PSEUDO_MD5_H */