#include <string.h>
#include <stdlib.h>
#include "sha256.h"
#include "sha512.h"
#include "sha1.h"
#include "md5.h"
#include "ripemd160.h"
Include dependency graph for hasher.h:
Go to the source code of this file.
Compounds | |
struct | hasher_t |
Defines | |
#define | HASHER_MAX_DIGEST_SIZE |
#define | HASHER_MAX_CTX_SIZE |
#define | hasher_t void |
Enumerations | |
enum | hasher_retcode { HASHER_OK, HASHER_BAD_HASH_ALGO, HASHER_NULL_POINTER } |
Functions | |
void | hasher_init (hasher_t *H) |
void | hasher_update (hasher_t *H, const uns8 *data, uns32 len) |
void | hasher_final (hasher_t *H, uns8 *result) |
hasher_retcode | hasher_setup (hasher_t *H, const char *algo) |
hasher_retcode | hasher_teardown (hasher_t *H) |
const char* | hasher_ret_msg (hasher_retcode c) |
Variables | |
const int | hasher_lengths [CRYPTO_HASH_COUNT][2] |
|
Value: ( max(\ sizeof(sha256_context),\ max(\ max(\ sizeof(ripemd160_context),\ sizeof(md5_context)\ ),\ max(\ sizeof(sha512_context),\ sizeof(sha1_context)\ )\ )\ )\ ) |
|
Value: |
|
|
|
|
|
Finalize the structure and produce a digest
|
|
Initalize the hasher pseudo-object Resets the digest internal state to unity |
|
Provide a human readable representation of an hasher_retcode error code
|
|
Setup the hasher object for use
|
|
De-allocate and erase the components of the hasher
|
|
Update the current state of hasher Operations are buffered, thus alignment issues are abstracted from lucky programm who uses this!
|
|
Array of digest lengths
|
![]() |
GPL |