mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-29 19:37:06 -05:00
Add new memflip() function to fix block flipping a bit.
Unfortunately it takes too mutch time, about 80 seconds a call, despite the optimization of saving the intermediate hash state.
This commit is contained in:
parent
246c1d3b72
commit
09fa4af509
4 changed files with 371 additions and 84 deletions
|
|
@ -118,6 +118,13 @@ void crc32c_init(void);
|
|||
*/
|
||||
void memhash(unsigned kind, const unsigned char* seed, void* digest, const void* src, unsigned size);
|
||||
|
||||
/**
|
||||
* Flips some bit in the data to make it to match the HASH.
|
||||
* Seed is a 128 bit vector.
|
||||
* Returns 0 on success.
|
||||
*/
|
||||
int memflip(unsigned kind, const unsigned char* seed, const void* digest, void* src, unsigned size);
|
||||
|
||||
/**
|
||||
* Return the hash name.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue