MD4 hash implementation. More...
#include "includes.h"
#include "common.h"
#include "crypto.h"
Go to the source code of this file.
Data Structures | |
struct | MD4Context |
Defines | |
#define | MD4_BLOCK_LENGTH 64 |
#define | MD4_DIGEST_LENGTH 16 |
#define | MD4_DIGEST_STRING_LENGTH (MD4_DIGEST_LENGTH * 2 + 1) |
#define | PUT_64BIT_LE(cp, value) |
#define | PUT_32BIT_LE(cp, value) |
#define | F1(x, y, z) (z ^ (x & (y ^ z))) |
#define | F2(x, y, z) ((x & y) | (x & z) | (y & z)) |
#define | F3(x, y, z) (x ^ y ^ z) |
#define | MD4STEP(f, w, x, y, z, data, s) ( w += f(x, y, z) + data, w = w<<s | w>>(32-s) ) |
Typedefs | |
typedef struct MD4Context | MD4_CTX |
Functions | |
int | md4_vector (size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) |
MD4 hash for data vector. |
MD4 hash implementation.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
Alternatively, this software may be distributed under the terms of BSD license.
See README and COPYING for more details.
Definition in file md4-internal.c.
#define PUT_32BIT_LE | ( | cp, | |||
value | ) |
do { \ (cp)[3] = (value) >> 24; \ (cp)[2] = (value) >> 16; \ (cp)[1] = (value) >> 8; \ (cp)[0] = (value); } while (0)
Definition at line 86 of file md4-internal.c.
#define PUT_64BIT_LE | ( | cp, | |||
value | ) |
do { \ (cp)[7] = (value) >> 56; \ (cp)[6] = (value) >> 48; \ (cp)[5] = (value) >> 40; \ (cp)[4] = (value) >> 32; \ (cp)[3] = (value) >> 24; \ (cp)[2] = (value) >> 16; \ (cp)[1] = (value) >> 8; \ (cp)[0] = (value); } while (0)
Definition at line 76 of file md4-internal.c.
int md4_vector | ( | size_t | num_elem, | |
const u8 * | addr[], | |||
const size_t * | len, | |||
u8 * | mac | |||
) |
MD4 hash for data vector.
num_elem | Number of elements in the data vector | |
addr | Pointers to the data areas | |
len | Lengths of the data blocks | |
mac | Buffer for the hash |
Definition at line 36 of file md4-internal.c.