For a function, being
one-way or
irreversible (almost similar concepts) is not enough to be entitled as a
hash function, there are at least two other critical tests to pass.
1-
Collision Resistance: The function should show very small probability for H(s
1) = H(s
2)
2-
Uniformity: For the function's codomain (the set of possible hash values), the probability for each value to be generated by H(s) where s is an arbitrary input, should be evenly distributed. There are tests like
chi-squared to evaluate a function's uniformity.
Obviously, Bitcoin hash function, SHA256(2) is an approved hash function for the application as it is irreversible AND passes above tests.