FNV-1a hash.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | s |
the bytes to hash |
pure integer(int64) function hash(s) result(h) !! FNV-1a hash. character(len=*), intent(in) :: s !! the bytes to hash integer :: k h = 1469598103_int64 do k = 1, len(s) h = ieor(h, int(iachar(s(k:k)), int64)) h = h*16777619_int64 h = iand(h, 4294967295_int64) end do end function hash