Instance Methodswift 6.0.3Swift
combine(bytes:)
Adds the contents of the given buffer to this hasher, mixing it into the hasher state.
mutating func combine(bytes: UnsafeRawBufferPointer)
Parameters
- bytes
A raw memory buffer.
Adds the contents of the given buffer to this hasher, mixing it into the hasher state.
mutating func combine(bytes: UnsafeRawBufferPointer)
A raw memory buffer.
import Swift
@frozen struct Hasher
The universal hash function used by Set
and Dictionary
.
@frozen struct UnsafeRawBufferPointer
A nonowning collection interface to the bytes in a region of memory.
init()
Creates a new hasher.
mutating func combine<H>(_ value: H) where H : Hashable
Adds the given value to this hasher, mixing its essential parts into the hasher state.
func finalize() -> Int
Finalizes the hasher state and returns the hash value.