// UseHashFunction allows you to set the hash function used for internal
// indexing by the HAMT.
//
// Passing in the returned Option to NewNode will generate a new HAMT that uses
// the specified hash function.
//
// The default hash function is murmur3-x64 but you should use a
// cryptographically secure function such as SHA2-256 if an attacker may be
// able to pick the keys in order to avoid potential hash collision (tree
// explosion) attacks.
UseHashFunction allows you to set the hash function used for internal
indexing by the HAMT.

Passing in the returned Option to NewNode will generate a new HAMT that uses
the specified hash function.

The default hash function is murmur3-x64 but you should use a
cryptographically secure function such as SHA2-256 if an attacker may be
able to pick the keys in order to avoid potential hash collision (tree
explosion) attacks.
// UseHashFunction allows you to set the hash function used for internal // indexing by the HAMT . // // Passing in the returned Option to NewNode will generate a new HAMT that uses // the specified hash function . // // The default hash function is murmur3 - x64 but you should use a // cryptographically secure function such as SHA2 - 256 if an attacker may be // able to pick the keys in order to avoid potential hash collision ( tree // explosion ) attacks .
func UseHashFunction(hash func([]byte) []byte) Option {
	return func(nd *Node) {
		nd.hash = hash
	}
}
func UseHashFunction ( hash func ( [ ] byte ) [ ] byte ) Option { return func ( nd * Node ) { nd . hash = hash } }
UseHashFunction allows you to set the hash function used for internal
indexing by the HAMT.
UseHashFunction allows you to set the hash function used for internal indexing by the HAMT .