// Return the stored hash, or an empty byte slice.
484756
func (state *UserState) stored_hash(username string) []byte {
	hashString, err := state.PasswordHash(username)
	if err != nil {
		return []byte{}
	}
	return []byte(hashString)
}
898337
func (ts *Store) Hash(id string) (string, error) {
	treepath := ts.GetPath(id)

	hash := sha512.New()
	iw := newHashWriter(hash)
	err := filepath.Walk(treepath, buildWalker(treepath, iw))
	if err != nil {
		return "", errwrap.Wrap(errors.New("error walking rootfs"), err)
	}

	hashstring := hashToKey(hash)

	return hashstring, nil
}
246354
func (node *Node) _hash() []byte {
	if node.hash != nil {
		return node.hash
	}

	h := tmhash.New()
	buf := new(bytes.Buffer)
	if err := node.writeHashBytes(buf); err != nil {
		panic(err)
	}
	h.Write(buf.Bytes())
	node.hash = h.Sum(nil)

	return node.hash
}
567806
func (h Hash) Bytes(key string) []byte {
	if value, ok := h[key]; ok {
		return value.Bytes()
	}
	return []byte{}
}
763841
func (f *Filter) hash(data []byte) [2]uint64 {
	v1 := xxhash.Sum64(data)
	var v2 uint64
	if len(data) > 0 {
		b := data[len(data)-1] // We'll put the original byte back.
		data[len(data)-1] = byte(0)
		v2 = xxhash.Sum64(data)
		data[len(data)-1] = b
	}
	return [2]uint64{v1, v2}
}
139011
func (v Var) Hash() int {
	h := xxhash.ChecksumString64S(string(v), hashSeed0)
	return int(h)
}
482414
func (h *DBHeader) GetHmacSha256(hmacKey []byte) (ret [32]byte) {
	hash := hmac.New(sha256.New, hmacKey)
	hash.Write(h.RawData)
	copy(ret[:32], hash.Sum(nil)[:32])
	return
}
473324
func Hash(path string) (uint64, error) {
	file, err := os.Open(path)
	if err != nil {
		return 0, err
	}
	defer file.Close()
	return HashFile(file)
}
1146473
func (ec *EthereumClient) GetHeaderByHash(ctx *Context, hash *Hash) (header *Header, _ error) {
	rawHeader, err := ec.client.HeaderByHash(ctx.context, hash.hash)
	return &Header{rawHeader}, err
}
674213
func (ac *ArrayComprehension) Hash() int {
	return ac.Term.Hash() + ac.Body.Hash()
}
107163
func (data *EvidenceData) Hash() cmn.HexBytes {
	if data.hash == nil {
		data.hash = data.Evidence.Hash()
	}
	return data.hash
}
1314028
func Hash(key uint64, buckets int32) int32 {
	var b, j int64

	if buckets <= 0 {
		buckets = 1
	}

	for j < int64(buckets) {
		b = j
		key = key*2862933555777941757 + 1
		j = int64(float64(b+1) * (float64(int64(1)<<31) / float64((key>>33)+1)))
	}

	return int32(b)
}
873290
func Hash(h crypto.Hash, src io.Reader) (HexDigest, error) {
	a := h.New()
	_, err := io.Copy(a, src)
	if err != nil {
		return HexDigest(""), err
	}
	return Sum(a), nil
}
63904
func HashFromBytes(data []byte) (Hash, error) {
	h := Hash{string(data)}
	if !h.IsValid() {
		return Hash{}, errors.WithStack(InvalidHashError{h})
	}
	return h, nil
}
1302266
func (m *HashMap) GetHashedKey(hashedKey uintptr) (value interface{}, ok bool) {
	data, element := m.indexElement(hashedKey)
	if data == nil {
		return nil, false
	}

	// inline HashMap.searchItem()
	for element != nil {
		if element.keyHash == hashedKey {
			return element.Value(), true
		}

		if element.keyHash > hashedKey {
			return nil, false
		}

		element = element.Next()
	}
	return nil, false
}
594592
func hash(parent string) string {
	res := md5.Sum([]byte(parent))
	return string(res[:])
}
46036
func hash(key uint64) uint64 {
	key ^= key >> 33
	key *= 0xff51afd7ed558ccd
	key ^= key >> 33
	key *= 0xc4ceb9fe1a85ec53
	key ^= key >> 33
	return key
}