mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-30 11:56:33 -05:00
Better MD5 support with test vectors, speed test and libcrypto fast implementation.
This commit is contained in:
parent
26c0e26a33
commit
face268eb1
14 changed files with 182 additions and 53 deletions
9
elem.h
9
elem.h
|
|
@ -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. */
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue