libhasha 2.2.2
Loading...
Searching...
No Matches
md5.h
Go to the documentation of this file.
1
18
19#if !defined(__HASHA_MD5_H)
20#define __HASHA_MD5_H
21
22#include "internal/internal.h"
23
28#define HA_MD5_BLOCK_SIZE 64
29
34#define HA_MD5_DIGEST_SIZE ha_bB(128)
35
37
45typedef struct ha_md5_context
46{
47 uint32_t state[4];
48 uint64_t
53
63
75 size_t len);
76
88
101HA_PUBFUN void ha_md5_hash(ha_inbuf_t data, size_t len,
102 ha_digest_t digest);
103
105
106#endif // __HASHA_MD5_H
#define HA_PUBFUN
Definition hadefs.h:34
#define HA_EXTERN_C_END
Definition hadefs.h:78
#define HA_EXTERN_C_BEG
Definition hadefs.h:70
HA_PUBFUN void ha_md5_hash(ha_inbuf_t data, size_t len, ha_digest_t digest)
Computes the MD5 hash in a one-shot operation.
HA_PUBFUN void ha_md5_init(ha_md5_context *ctx)
Initializes the MD5 context.
#define HA_MD5_BLOCK_SIZE
Block size (in bytes) for the MD5 algorithm.
Definition md5.h:28
HA_PUBFUN void ha_md5_final(ha_md5_context *ctx, ha_digest_t digest)
Finalizes the MD5 computation and produces the hash digest.
HA_PUBFUN void ha_md5_update(ha_md5_context *ctx, ha_inbuf_t data, size_t len)
Updates the MD5 context with new data.
Context structure for MD5 hashing.
Definition md5.h:46
uint64_t bit_count
Definition md5.h:49
uint8_t buffer[HA_MD5_BLOCK_SIZE]
Definition md5.h:50
uint32_t state[4]
Definition md5.h:47
__ha_out_buf_type ha_digest_t
Definition types.h:15
__ha_in_buf_type ha_inbuf_t
Definition types.h:12