Hash
Edit on GitHubUtilities for hashing any value.
Added in 0.1.0
No other changes yet.
Values
Functions and constants included in the Hash module.
Hash.hash
Added in 0.1.0
No other changes yet.
A generic hash function that produces an integer from any value. If a == b
then Hash.hash(a) == Hash.hash(b)
.
Parameters:
param | type | description |
---|---|---|
anything |
a |
The value to hash |
Returns:
type | description |
---|---|
Number |
A hash for the given value |
Throws:
Failure(String)
- If WASI random_get fails
Examples: