fnv_1a Interface

public interface fnv_1a

Generic interface to perform hashing

Usage:

 fnv_1a([seed],input)

where input is any of the supported types


Contents


Module Procedures

private pure function fnv_1a_char_scalar(input) result(hash)

Hash a single default kind character variable

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: input

Return Value integer(kind=int64)

private pure function fnv_1a_char_scalar_seed(seed, input) result(hash)

Hash a character(*) string of default kind

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: seed
character(len=*), intent(in) :: input

Return Value integer(kind=int64)

private pure function fnv_1a_int32_scalar(input) result(hash)

Hash a single 32bit integer

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: input

Return Value integer(kind=int64)

private pure function fnv_1a_int32_scalar_seed(seed, input) result(hash)

Hash a single 32bit integer with a starting seed

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: seed
integer(kind=int32), intent(in) :: input

Return Value integer(kind=int64)

private pure function fnv_1a_int32_1d(input) result(hash)

Hash a 1D array of 32bit integers

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: input(:)

Return Value integer(kind=int64)

private pure function fnv_1a_int32_1d_seed(seed, input) result(hash)

Hash a 1D array of 32bit integers with a starting seed

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: seed
integer(kind=int32), intent(in) :: input(:)

Return Value integer(kind=int64)

private pure function fnv_1a_int64_scalar(input) result(hash)

Hash a single 64bit integer

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: input

Return Value integer(kind=int64)

private pure function fnv_1a_int64_scalar_seed(seed, input) result(hash)

Hash a single 64bit integer with a starting seed

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: seed
integer(kind=int64), intent(in) :: input

Return Value integer(kind=int64)

private pure function fnv_1a_int64_1d(input) result(hash)

Hash a 1D array of 64bit integers

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: input(:)

Return Value integer(kind=int64)

private pure function fnv_1a_int64_1d_seed(seed, input) result(hash)

Hash a 1D array of 64bit integers with a starting seed

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: seed
integer(kind=int64), intent(in) :: input(:)

Return Value integer(kind=int64)