update(data:)
Incrementally updates the hash function with the given data.
Declaration
mutating func update<D>(data: D) where D : DataProtocolParameters
- data:
The next block of data for the ongoing digest calculation. You can provide this as any type that conforms to Dataprotocol, like Data or an array of Uint8 instances.
Discussion
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.