update(data:)
Incrementally updates the hash function with the given data.
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
mutating func update<D>(data: D) where D : DataProtocol
Parameters
- data
The next block of data for the ongoing digest calculation. You can provide this as any type that conforms to doc://com.apple.documentation/documentation/foundation/dataprotocol, like doc://com.apple.documentation/documentation/foundation/data or an array of doc://com.apple.documentation/documentation/swift/uint8 instances.
Call this method one or more times to provide data to the hash function in blocks. After providing the last block of data, call the finalize
method to get the computed digest. Don’t call the update method again after finalizing the hash function.