func (h hashPrefix) IsFull() bool {
	return len(h) == maxHashPrefixLength
}
IsFull reports whether the hash is a full SHA256 hash.
package safebrowsing
import (
	"crypto/sha256"
	"encoding/binary"
	"errors"
	"io"
	"sort"
	"strings"
	pb "github.com/google/safebrowsing/internal/safebrowsing_proto"
)
const (
	minHashPrefixLength = 4
	maxHashPrefixLength = sha256.Size
)
type hashPrefix string
func hashFromPattern(pattern string) hashPrefix {
	hash := sha256.New()
	hash.Write([]byte(pattern))
	return hashPrefix(hash.Sum(nil))
}
func (h hashPrefix) HasPrefix(other hashPrefix) bool {
	return strings.HasPrefix(string(h), string(other))
}