when state was already used with the same `seed` previously.
This skips secret generation when `seed` remains constant.
Also : improves streaming speed on small data
thanks to lighter memset() during reset().
In file included from xxhash.h:2065,
from xxhash.c:43:
xxh3.h: In function 'XXH3_len_9to16_128b':
xxh3.h:2278: warning: integer constant is too large for 'long' type
also : fixed XXH128_withSecret(),
which was messed up with default `kSecret`.
This error remained unnoticed because their was no test for this variant.
Added a test in `xxhsum` checking results of `XXH128_withSecret()`
replace 2 functions : XXH3_64bits() and XXH3_64bits_withSeed()
new target : make dispatch
compiled with -mavx2 by default
compiles fine with -mavx512f, but then crash at runtime detection
Following comments from @koraa :
- fix endianess issue, by using canonical representation
- all segments are derived from first one, in order to reduce dependency chain
- all derived segments use a seed, which is a combination raw custom seed content and segNb
- updated documentation
This variant breaks the possibility for an actor
to derive the entire secret from the knowledge of one of its segments
since it requires the seed, which is derived from original custom seed,
which is not present anywhere, condensed in the scrambling operation.
update 128-bit scrambler at each 16-bytes round.
ensure there is no delta-correlation possible between segments,
even when the initial custom seed is poor (<= 16 bytes, or full of `\0` characters).
Streaming implementation of XXH3/XXH128 could fail, reporting an incorrect hash value,
for certain specific ranges of length, and providing input in segments of random length.
issue reported by @WayneD
fix#378
updated test case to catch this issue
* vectorize initCustomSecret method
* revert Makefile
* pass compiling
* revert Makefile
* fix unused function warning
* do not use brace initialization for sse types
* workaround for msvc 32bit mode before vs 2013U2
* workaround before MSVC 2015
* use portable way for sse2
* Revert "use portable way for sse2"
This reverts commit 34eee07a7071ab963bd5a48e3960f40b28e209c2.
* use _mm_load_si128 for MSVC x86
* try to minimize align of custom secret
* for avx2 and sse2, optmize the prolog of XXH3_hashLong_xb_withSeed
Co-authored-by: James Z.M. Gao <gaozhiming@360.cn>
- Every symbol, typedef, and macro is prefixed with XXH or xxh.
- For compatibility with legacy code that messes with the internals,
XXH_OLD_NAMES can be defined to wrap the old names in macros. This
also brings back U32 and friends.