code: func (d HexDigest) Validate(h crypto.Hash) bool {
  	if l := h.Size() * 2; len(d) != l {
  		return false
  	}
  	for _, c := range d {
  		if ('0' <= c && c <= '9') || ('a' <= c && c <= 'f') {
  			continue
  		}
  		return false
  	}
  	return true
  }
docs: // Validate returns true if the hash is valid.