Instance Method

finalize()

Finalizes the hash function and returns the computed digest.

Declaration

func finalize() -> Insecure.MD5.Digest

Return Value

The computed digest of the data.

Discussion

Call this method after you provide the hash function with all the data to hash by making one or more calls to the update(data:) or update(bufferPointer:) method. After finalizing the hash function, discard it. To compute a new digest, create a new hash function with a call to the init() method.

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 update(bufferPointer: UnsafeRawBufferPointer)

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