Skip to content

Commit 68b9b08

Browse files
committed
[stdlib] Add 256 bits of extra state to Hasher
1 parent a4d68b0 commit 68b9b08

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

stdlib/public/core/SipHash.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ internal struct _SipHashState {
2828
fileprivate var v1: UInt64 = 0x646f72616e646f6d
2929
fileprivate var v2: UInt64 = 0x6c7967656e657261
3030
fileprivate var v3: UInt64 = 0x7465646279746573
31+
// The fields below are reserved for future use. They aren't currently used.
32+
fileprivate var v4: UInt64 = 0
33+
fileprivate var v5: UInt64 = 0
34+
fileprivate var v6: UInt64 = 0
35+
fileprivate var v7: UInt64 = 0
3136

3237
@inline(__always)
3338
fileprivate init(rawSeed: (UInt64, UInt64)) {

test/api-digester/Outputs/stability-stdlib-abi.swift.expected

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ Var _CocoaDictionary.Index._offset is added to a non-resilient type
5252
Var _CocoaDictionary.Index._storage in a non-resilient type changes position from 1 to 0
5353
Var _CocoaSet.Index._offset is added to a non-resilient type
5454
Var _CocoaSet.Index._storage in a non-resilient type changes position from 1 to 0
55+
Var _SipHashState.v4 is added to a non-resilient type
56+
Var _SipHashState.v5 is added to a non-resilient type
57+
Var _SipHashState.v6 is added to a non-resilient type
58+
Var _SipHashState.v7 is added to a non-resilient type
5559

5660
/* Decl Attribute changes */
5761

0 commit comments

Comments
 (0)