Better MD5 support with test vectors, speed test and libcrypto fast implementation.

This commit is contained in:
Andrea Mazzoleni 2011-03-25 21:04:46 +01:00
parent 26c0e26a33
commit face268eb1
14 changed files with 182 additions and 53 deletions

9
elem.h
View file

@ -18,7 +18,7 @@
#ifndef __ELEM_H
#define __ELEM_H
#include "md5.h"
#include "util.h"
#include "tommylist.h"
#include "tommyhash.h"
#include "tommyhashdyn.h"
@ -27,11 +27,6 @@
/****************************************************************************/
/* snapraid */
/**
* Size of the hash used as a checksum.
*/
#define HASH_MAX MD5_SIZE
/**
* Invalid position.
*/
@ -70,7 +65,7 @@ struct snapraid_block {
block_off_t parity_pos; /**< Position of the block in the parity. */
unsigned flag; /**< If the hash of the block is valid. */
struct snapraid_file* file; /**< Back pointer to the file owning this block. */
unsigned char hash[HASH_MAX]; /**< Hash of the block. */
unsigned char hash[MD5_SIZE]; /**< Hash of the block. */
};
/**