2 * fnv1a.h : routines to create checksums derived from FNV-1a
4 * ====================================================================
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements. See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership. The ASF licenses this file
9 * to you under the Apache License, Version 2.0 (the
10 * "License"); you may not use this file except in compliance
11 * with the License. You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing,
16 * software distributed under the License is distributed on an
17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18 * KIND, either express or implied. See the License for the
19 * specific language governing permissions and limitations
21 * ====================================================================
24 #ifndef SVN_LIBSVN_SUBR_FNV1A_H
25 #define SVN_LIBSVN_SUBR_FNV1A_H
27 #include <apr_pools.h>
29 #include "svn_types.h"
33 #endif /* __cplusplus */
35 /* Opaque FNV-1a checksum creation context type.
37 typedef struct svn_fnv1a_32__context_t svn_fnv1a_32__context_t;
39 /* Return a new FNV-1a checksum creation context allocated in POOL.
41 svn_fnv1a_32__context_t *
42 svn_fnv1a_32__context_create(apr_pool_t *pool);
44 /* Feed LEN bytes from DATA into the FNV-1a checksum creation CONTEXT.
47 svn_fnv1a_32__update(svn_fnv1a_32__context_t *context,
51 /* Return the FNV-1a checksum over all data fed into CONTEXT.
54 svn_fnv1a_32__finalize(svn_fnv1a_32__context_t *context);
57 /* Opaque modified FNV-1a checksum creation context type.
59 typedef struct svn_fnv1a_32x4__context_t svn_fnv1a_32x4__context_t;
61 /* Return a new modified FNV-1a checksum creation context allocated in POOL.
63 svn_fnv1a_32x4__context_t *
64 svn_fnv1a_32x4__context_create(apr_pool_t *pool);
66 /* Feed LEN bytes from DATA into the modified FNV-1a checksum creation
70 svn_fnv1a_32x4__update(svn_fnv1a_32x4__context_t *context,
74 /* Return the modified FNV-1a checksum over all data fed into CONTEXT.
77 svn_fnv1a_32x4__finalize(svn_fnv1a_32x4__context_t *context);
79 /* Set HASHES to the 4 partial hash sums produced by the modified FVN-1a
80 * over INPUT of LEN bytes.
83 svn__fnv1a_32x4_raw(apr_uint32_t hashes[4],
89 #endif /* __cplusplus */
91 #endif /* SVN_LIBSVN_SUBR_FNV1A_H */