diff --git a/HISTORY b/HISTORY index b15ef041..50883da4 100644 --- a/HISTORY +++ b/HISTORY @@ -17,7 +17,7 @@ SnapRAID HISTORY for SSE2 and MMX. * Added support for multiple 'content' files. You can save extra copies to be able to verify the checksums also if you lose all the 'content' files in the - parity drives. + parity disks. * Added a filtering include logic, where anything not explicitely included is excluded. For example, it allow to include only the files in a predefined set of directories. diff --git a/util.c b/util.c index ea5b99aa..bcb579a7 100644 --- a/util.c +++ b/util.c @@ -255,40 +255,6 @@ void* malloc_nofail_align(size_t size, void** freeptr) return ptr; } -void memxor(unsigned char* xor, const unsigned char* block, unsigned size) -{ - while (size >= 16) { - uint32_t* xor32 = (uint32_t*)xor; - const uint32_t* block32 = (const uint32_t*)block; - xor32[0] ^= block32[0]; - xor32[1] ^= block32[1]; - xor32[2] ^= block32[2]; - xor32[3] ^= block32[3]; - - xor += 16; - block += 16; - size -= 16; - } - - while (size >= 4) { - uint32_t* xor32 = (uint32_t*)xor; - const uint32_t* block32 = (const uint32_t*)block; - xor32[0] ^= block32[0]; - - xor += 4; - block += 4; - size -= 4; - } - - while (size != 0) { - xor[0] ^= block[0]; - - xor += 1; - block += 1; - size -= 1; - } -} - #if HAVE_LIBCRYPTO #include #else diff --git a/util.h b/util.h index 8b37d694..a725f639 100644 --- a/util.h +++ b/util.h @@ -116,10 +116,8 @@ void* malloc_nofail(size_t size); */ void* malloc_nofail_align(size_t size, void** freeptr); -/** - * Xor two memory blocks. - */ -void memxor(unsigned char* xor, const unsigned char* block, unsigned size); +/****************************************************************************/ +/* hash */ /** * Size of the hash.