Instance Method

finalize()

Finalizes the hasher state and returns the hash value.

Declaration

func finalize() -> Int

Return Value

The hash value calculated by the hasher.

Discussion

Finalizing consumes the hasher: it is illegal to finalize a hasher you don’t own, or to perform operations on a finalized hasher. (These may become compile-time errors in the future.)

Hash values are not guaranteed to be equal across different executions of your program. Do not save hash values to use during a future execution.