Commit Graph

9 Commits

Author SHA1 Message Date
Karoy Lorentey
3ae170c1c1 [stdlib] Remove SipHash from ABI-visible names
Also, eliminate the (unused) SipHash24 implementation and nest most of Hasher’s internals under Hasher itself.
2018-11-01 00:45:40 +00:00
Karoy Lorentey
b2ef455b3a [test] Update tests for _rawHashValue(seed:) changes 2018-09-24 13:31:19 +01:00
Karoy Lorentey
97ec2967e0 [SE-0206][stdlib] Hasher, SipHash: Make non-public declarations internal
Newly internal declarations include Hasher._seed and the integer overloads of Hasher._combine(_:), as well as _SipHash13 and _SipHash24.

Unify the interfaces of these SipHash testing structs with Hasher. Update SipHash test to cover Hasher, too.

Add @usableFromInline to all newly internal stuff. In addition to its normal use, it also enables white box testing; compile tests that need to use these declarations with -disable-access-control.
2018-04-24 17:42:42 +01:00
Karoy Lorentey
7e66a38af8 [stdlib] De-gyb SipHash; implement full Hasher API 2018-04-18 17:33:24 +01:00
Karoy Lorentey
ccdc218cbd [stdlib] _Hasher: append => combine 2018-04-18 14:18:44 +01:00
Karoy Lorentey
8cf5bc8bdc [stdlib] Switch to using SipHash-1-3 as the standard hash function
Beyond switching hashing algorithms, this also enables per-execution hash seeds, fulfilling a long-standing prophecy in Hashable’s documentation.

To reduce the possibility of random test failures, StdlibUnittest’s TestSuite overrides the random hash seed on initialization.

rdar://problem/24109692
rdar://problem/35052153
2018-03-09 14:48:59 +00:00
Max Moiseev
08cf1de65a [WIP] fixing some of the integer related test failures 2016-10-05 15:25:23 -07:00
Dmitri Gribenko
532cf06930 stdlib: add convenience APIs to the SipHash implementation 2016-09-06 20:41:03 -07:00
Dmitri Gribenko
e242b4a472 stdlib: implement SipHash-1-3 and SipHash-2-4 2016-09-06 20:41:03 -07:00