#include "eyefi.h"
#include <string.h>
gehe zum Quellcode dieser Datei
|
#define | INTERNAL_MD5 1 |
|
#define | byteReverse(buf, len) /* Nothing */ |
|
#define | F1(x, y, z) (z ^ (x & (y ^ z))) |
|
#define | F2(x, y, z) F1(z, x, y) |
|
#define | F3(x, y, z) (x ^ y ^ z) |
|
#define | F4(x, y, z) (y ^ (x | ~z)) |
|
#define | MD5STEP(f, w, x, y, z, data, s) ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x ) |
|
|
void | hmac_md5_vector (const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) |
|
void | hmac_md5 (const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac) |
|
static void | MD5Init (struct MD5Context *context) |
|
static void | MD5Update (struct MD5Context *context, unsigned char const *buf, unsigned len) |
|
static void | MD5Final (unsigned char digest[16], struct MD5Context *context) |
|
static void | MD5Transform (u32 buf[4], u32 const in[16]) |
|
void | md5_vector (size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) |
|
#define byteReverse |
( |
|
buf, |
|
|
|
len |
|
) |
| /* Nothing */ |
#define F1 |
( |
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| (z ^ (x & (y ^ z))) |
#define F2 |
( |
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| F1(z, x, y) |
#define F3 |
( |
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| (x ^ y ^ z) |
#define F4 |
( |
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| (y ^ (x | ~z)) |
#define MD5STEP |
( |
|
f, |
|
|
|
w, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z, |
|
|
|
data, |
|
|
|
s |
|
) |
| ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x ) |
hmac_md5 - HMAC-MD5 over data buffer (RFC 2104) : Key for HMAC operations : Length of the key in bytes : Pointers to the data area : Length of the data area : Buffer for the hash (16 bytes)
Definiert in Zeile 102 der Datei md5.c.
hmac_md5_vector - HMAC-MD5 over data vector (RFC 2104) : Key for HMAC operations : Length of the key in bytes : Number of elements in the data vector : Pointers to the data areas : Lengths of the data blocks : Buffer for the hash (16 bytes)
Definiert in Zeile 30 der Datei md5.c.
67 for (i = 0; i < 64; i++)
73 for (i = 0; i < num_elem; i++) {
74 _addr[i + 1] =
addr[i];
82 for (i = 0; i < 64; i++)
md5_vector - MD5 hash for data vector : Number of elements in the data vector : Pointers to the data areas : Lengths of the data blocks : Buffer for the hash
Definiert in Zeile 137 der Datei md5.c.
143 for (i = 0; i < num_elem; i++)
void MD5Final |
( |
unsigned char |
digest[16], |
|
|
struct MD5Context * |
context |
|
) |
| |
|
static |
Definiert in Zeile 252 der Datei md5.c.
258 count = (ctx->bits[0] >> 3) & 0x3F;
266 count = 64 - 1 -
count;
284 ((
u32 *) ctx->in)[14] = ctx->bits[0];
285 ((
u32 *) ctx->in)[15] = ctx->bits[1];
Definiert in Zeile 189 der Datei md5.c.
191 ctx->buf[0] = 0x67452301;
192 ctx->buf[1] = 0xefcdab89;
193 ctx->buf[2] = 0x98badcfe;
194 ctx->buf[3] = 0x10325476;
static void MD5Transform |
( |
u32 |
buf[4], |
|
|
u32 const |
in[16] |
|
) |
| |
|
static |
Definiert in Zeile 310 der Datei md5.c.
312 register u32 a, b, c,
d;
void MD5Update |
( |
struct MD5Context * |
context, |
|
|
unsigned char const * |
buf, |
|
|
unsigned |
len |
|
) |
| |
|
static |
Definiert in Zeile 204 der Datei md5.c.
211 if ((ctx->bits[0] = t + ((
u32)
len << 3)) < t)
213 ctx->bits[1] +=
len >> 29;
220 unsigned char *p = (
unsigned char *) ctx->in + t;