Defines incremental hash generation APIs. More...


Go to the source code of this file.
Macros | |
| #define | SYS_HASH_SIZE 32 |
| Maximum digest buffer size in bytes. | |
| #define | SYS_HASH_CAPACITY 4 |
| Maximum number of concurrent hash contexts available. | |
Typedefs | |
| typedef enum sys_hash_algorithm_t | sys_hash_algorithm_t |
| Hash algorithm identifiers. | |
| typedef struct sys_hash_t | sys_hash_t |
| Hash context. | |
Enumerations | |
| enum | sys_hash_algorithm_t { sys_hash_md5 = 1, sys_hash_sha256 } |
| Hash algorithm identifiers. More... | |
Functions | |
Lifecycle | |
| sys_hash_t * | sys_hash_init (sys_hash_algorithm_t algorithm) |
| Initialize a new hash context. More... | |
| void | sys_hash_deinit (sys_hash_t *hash) |
| Release a hash context. More... | |
Methods | |
| size_t | sys_hash_size (const sys_hash_t *hash) |
| Return the digest size in bytes for a hash context. More... | |
| bool | sys_hash_update (sys_hash_t *hash, sys_iostream_t *stream, size_t size) |
| Update a hash context by reading more data from a stream. More... | |
| const uint8_t * | sys_hash_finalize (sys_hash_t *hash) |
| Finalize the hash computation. More... | |
| uintptr_t | sys_hash_djb2 (const char *str) |
| Compute a djb2 hash for a NULL-terminated string. More... | |
Defines incremental hash generation APIs.
Definition in file hash.h.