func BytesToHash(b []byte) (Hash, error) {
	if len(b) != 32 {
		return Hash{}, errors.New("expected hash to be length 32")
	}
	var out Hash
	copy(out[:], b)
	return out, nil
}
// BytesToHash converts a byte array to a hash.
BytesToHash converts a byte array to a hash.
// BytesToHash converts a byte array to a hash .
func BytesToHash(b []byte) (Hash, error) {
	if len(b) != 32 {
		return Hash{}, errors.New("expected hash to be length 32")
	}
	var out Hash
	copy(out[:], b)
	return out, nil
}
func BytesToHash ( b [ ] byte ) ( Hash , error ) { if len ( b ) != 32 { return Hash { } , errors . New ( " " ) } var out Hash copy ( out [ : ] , b ) return out , nil }
BytesToHash converts a byte array to a hash.
BytesToHash converts a byte array to a hash .