TeoCCl library  0.1.7
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
hash.h
Go to the documentation of this file.
1 /*
2  * The MIT License
3  *
4  * Copyright 2016 Kirill Scherba <kirill@scherba.ru>.
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to deal
8  * in the Software without restriction, including without limitation the rights
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  * copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in
14  * all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22  * THE SOFTWARE.
23  *
24  * \file hash.h
25  * \brief Hash module
26  * \author Kirill Scherba <kirill@scherba.ru>
27  *
28  * Created on June 5, 2016, 4:29 PM
29  */
30 
31 #ifndef HASH_H
32 #define HASH_H
33 
34 #include <stdint.h>
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 uint32_t teoHashSuperFast(const uint8_t* data, int len);
41 /* the previous hash, or an arbitrary value */
42 uint32_t teoHashFast(register const uint8_t* k, register uint32_t length, register uint32_t initval);
43 
44 #ifdef __cplusplus
45 }
46 #endif
47 
48 #endif /* HASH_H */
49 
uint32_t teoHashFast(register const uint8_t *k, register uint32_t length, register uint32_t initval)
Definition: hash.c:169
uint32_t teoHashSuperFast(const uint8_t *data, int len)
Definition: hash.c:49