#include "md5.h"
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
Defines | |
#define | md5_init_ctx __md5_init_ctx |
#define | md5_process_block __md5_process_block |
#define | md5_process_bytes __md5_process_bytes |
#define | md5_finish_ctx __md5_finish_ctx |
#define | md5_read_ctx __md5_read_ctx |
#define | md5_buffer __md5_buffer |
#define | SWAP(n) (n) |
#define | BLOCKSIZE 32768 |
#define | FF(b, c, d) (d ^ (b & (c ^ d))) |
#define | FG(b, c, d) FF (d, b, c) |
#define | FH(b, c, d) (b ^ c ^ d) |
#define | FI(b, c, d) (c ^ (b | ~d)) |
#define | OP(a, b, c, d, s, T) |
#define | CYCLIC(w, s) (w = (w << s) | (w >> (32 - s))) |
#define | OP(f, a, b, c, d, k, s, T) |
Functions | |
void | md5_init_ctx (struct md5_ctx *ctx) |
void * | md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) |
void * | md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) |
void * | md5_buffer (const char *buffer, size_t len, void *resblock) |
* Compute MD5 message digest for bytes read from STREAM. The | |
void | md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx) |
void | md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx) |
#define BLOCKSIZE 32768 |
#define CYCLIC | ( | w, | |||
s | ) | (w = (w << s) | (w >> (32 - s))) |
#define FF | ( | b, | |||
c, | |||||
d | ) | (d ^ (b & (c ^ d))) |
#define FG | ( | b, | |||
c, | |||||
d | ) | FF (d, b, c) |
#define FH | ( | b, | |||
c, | |||||
d | ) | (b ^ c ^ d) |
#define FI | ( | b, | |||
c, | |||||
d | ) | (c ^ (b | ~d)) |
#define md5_buffer __md5_buffer |
#define md5_finish_ctx __md5_finish_ctx |
#define md5_init_ctx __md5_init_ctx |
#define md5_process_block __md5_process_block |
#define md5_process_bytes __md5_process_bytes |
#define md5_read_ctx __md5_read_ctx |
#define OP | ( | f, | |||
a, | |||||
b, | |||||
c, | |||||
d, | |||||
k, | |||||
s, | |||||
T | ) |
do \ { \ a += f (b, c, d) + correct_words[k] + T; \ CYCLIC (a, s); \ a += b; \ } \ while (0)
#define OP | ( | a, | |||
b, | |||||
c, | |||||
d, | |||||
s, | |||||
T | ) |
#define SWAP | ( | n | ) | (n) |
void* md5_buffer | ( | const char * | buffer, | |
size_t | len, | |||
void * | resblock | |||
) |
* Compute MD5 message digest for bytes read from STREAM. The
void* md5_finish_ctx | ( | struct md5_ctx * | ctx, | |
void * | resbuf | |||
) |
void md5_init_ctx | ( | struct md5_ctx * | ctx | ) |
void md5_process_block | ( | const void * | buffer, | |
size_t | len, | |||
struct md5_ctx * | ctx | |||
) |
void md5_process_bytes | ( | const void * | buffer, | |
size_t | len, | |||
struct md5_ctx * | ctx | |||
) |
void* md5_read_ctx | ( | const struct md5_ctx * | ctx, | |
void * | resbuf | |||
) |