rizin/librz/hash/algorithms/md4/md4.h
Giovanni 82e7917294
Refactoring Hash (#1082)
* Added authors and licenses and plugin access to crypto related files
* removed `rz_hash` and related files
* introduced `rz_msg_digest_*` with plugins
* updated all old methods with newer ones.
* added HMAC support to `rz-hash` (moved key option under `-K`)
* removed wrong algorithms on `woD`/`woE`
* fixed parity digest size
* fixed the behaviour on all hash functions
* added unit test for hash
* optimized code for HMAC key calculation
* removed hash legacy tests
2021-05-02 20:47:17 +08:00

23 lines
544 B
C

// SPDX-FileCopyrightText: 2021 deroad <wargio@libero.it>
// SPDX-License-Identifier: LGPL-3.0-only
#ifndef RZ_HASH_MD4_H
#define RZ_HASH_MD4_H
#include <rz_types.h>
#define RZ_HASH_MD4_DIGEST_SIZE 0x10
#define RZ_HASH_MD4_BLOCK_LENGTH 0x40
typedef struct {
ut32 digest[4];
ut8 block[RZ_HASH_MD4_BLOCK_LENGTH];
ut64 index;
ut64 len_high;
ut64 len_low;
} RzMD4;
void rz_md4_init(RzMD4 *context);
bool rz_md4_update(RzMD4 *context, const ut8 *data, ut64 length);
void rz_md4_fini(ut8 *hash, RzMD4 *context);
#endif /* RZ_HASH_MD4_H */