poser
A C framework for POsix SERvices
Loading...
Searching...
No Matches
hash.h
Go to the documentation of this file.
1#ifndef POSER_CORE_HASH_H
2#define POSER_CORE_HASH_H
3
8#include <poser/decl.h>
9
10#include <stddef.h>
11#include <stdint.h>
12
17C_CLASS_DECL(PSC_Hash);
18
29DECLEXPORT PSC_Hash *
30PSC_Hash_create(int func, int flags);
31
39DECLEXPORT uint64_t
40PSC_Hash_bytes(PSC_Hash *self, const uint8_t *data, size_t size);
41
48DECLEXPORT uint64_t
49PSC_Hash_string(PSC_Hash *self, const char *str);
50
55DECLEXPORT void
57
58#endif
Calculate non-cryptographic hashes of some data.
PSC_Hash * PSC_Hash_create(int func, int flags)
PSC_Hash default constructor.
uint64_t PSC_Hash_bytes(PSC_Hash *self, const uint8_t *data, size_t size)
Calculate a hash from any data.
void PSC_Hash_destroy(PSC_Hash *self)
PSC_Hash destructor.
uint64_t PSC_Hash_string(PSC_Hash *self, const char *str)
Calculate a hash from a string.