Return the accumulator to its initial state.
With no argument it restarts from ARRAY_HASH64_OFFSET_BASIS. Pass
seed to start from a different value instead, which is how you
domain-separate two hashes over the same bytes, or resume a digest
saved by an earlier run.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash64_t), | intent(inout) | :: | this | |||
| integer(kind=int64), | intent(in), | optional | :: | seed |
Starting hash value; defaults to |
pure subroutine array_hash64_reset(this, seed) !! Return the accumulator to its initial state. !! !! With no argument it restarts from `ARRAY_HASH64_OFFSET_BASIS`. Pass !! `seed` to start from a different value instead, which is how you !! domain-separate two hashes over the same bytes, or resume a digest !! saved by an earlier run. class(array_hash64_t), intent(inout) :: this integer(int64), intent(in), optional :: seed !! Starting hash value; defaults to `ARRAY_HASH64_OFFSET_BASIS`. if (present(seed)) then this%state = seed else this%state = ARRAY_HASH64_OFFSET_BASIS end if this%nbytes = 0_int64 end subroutine array_hash64_reset