Instance Method

update(bufferPointer:)

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

Declaration

mutating func update(bufferPointer: UnsafeRawBufferPointer)

Parameters

bufferPointer

A pointer to the next block of data for the ongoing digest calculation.

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.

Relationships

From Protocol

See Also

Computing a Hash Iteratively

init()

Creates a MD5 hash function.

func update<D>(data: D)

Incrementally updates the hash function with the given data.

func finalize() -> Insecure.MD5.Digest

Finalizes the hash function and returns the computed digest.