Generic Instance Method


Incrementally updates the hash function with the given data.


mutating func update<D>(data: D) where D : DataProtocol



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.


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.

See Also

Computing a Hash Iteratively


Creates a MD5 hash function.

func update(bufferPointer: UnsafeRawBufferPointer)

Incrementally updates the hash function with the contents of the buffer.

func finalize() -> Insecure.MD5.Digest

Finalizes the hash function and returns the computed digest.