// hash generates a unique identifier for the command
516883
func (c Cmd) hash() cmdHash {
	output := c.Name
	for _, arg := range c.Args {
		output += fmt.Sprintf("%v", arg)
	}
	return cmdHash(output)
}
313122
func (pos *Position) Hash() [16]byte {
	sq := "-"
	if pos.enPassantSquare != NoSquare {
		sq = pos.enPassantSquare.String()
	}
	s := pos.turn.String() + ":" + pos.castleRights.String() + ":" + sq
	for _, p := range allPieces {
		bb := pos.board.bbForPiece(p)
		s += ":" + strconv.FormatUint(uint64(bb), 16)
	}
	return md5.Sum([]byte(s))
}
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}
}
29077
func hash(settings map[string]interface{}) (string, error) {
	bytes, err := yaml.Marshal(settings)
	if err != nil {
		return "", errors.Trace(err)
	}
	hash := sha256.New()
	_, err = hash.Write(bytes)
	if err != nil {
		return "", errors.Trace(err)
	}
	return hex.EncodeToString(hash.Sum(nil)), nil
}
844522
func Hash(s string) string {
	h := sha1.New()
	h.Write([]byte(s))

	hash := h.Sum(nil)

	return fmt.Sprintf("%x", hash)
}
1253044
func (msg *Message) Hash() uint64 {
	data, _ := msg.Marshal()
	return murmur3.Sum64(data)
}
340100
func (b *Block) Hash() common.Hash {
	if hash := b.hash.Load(); hash != nil {
		return hash.(common.Hash)
	}
	v := b.header.Hash()
	b.hash.Store(v)
	return v
}
268663
func (t *Trie) Hash() common.Hash {
	hash, cached, _ := t.hashRoot(nil, nil)
	t.root = cached
	return common.BytesToHash(hash.(hashNode))
}
1369906
func (mi MessageImprint) Hash() (crypto.Hash, error) {
	algo := mi.HashAlgorithm.Algorithm.String()
	hash := oid.DigestAlgorithmToCryptoHash[algo]
	if hash == 0 || !hash.Available() {
		return 0, protocol.ErrUnsupported
	}

	return hash, nil
}
77893
func (s SHA512Hasher) Hash(b []byte) Hash {
	tmp := sha512.Sum512(b)
	return Hash(tmp[:])
}
705492
func (h *HashMap) Hash() int {
	var hash int
	h.Iter(func(k, v T) bool {
		hash += h.hash(k) + h.hash(v)
		return false
	})
	return hash
}
440139
func (key *pstmtPlanCacheKey) Hash() []byte {
	if len(key.hash) == 0 {
		var (
			dbBytes    = hack.Slice(key.database)
			bufferSize = len(dbBytes) + 8*6
		)
		if key.hash == nil {
			key.hash = make([]byte, 0, bufferSize)
		}
		key.hash = append(key.hash, dbBytes...)
		key.hash = codec.EncodeInt(key.hash, int64(key.connID))
		key.hash = codec.EncodeInt(key.hash, int64(key.pstmtID))
		key.hash = codec.EncodeInt(key.hash, int64(key.snapshot))
		key.hash = codec.EncodeInt(key.hash, key.schemaVersion)
		key.hash = codec.EncodeInt(key.hash, int64(key.sqlMode))
		key.hash = codec.EncodeInt(key.hash, int64(key.timezoneOffset))
	}
	return key.hash
}
455124
func (str String) Hash() int {
	h := xxhash.ChecksumString64S(string(str), hashSeed0)
	return int(h)
}
1340101
func (c *Container) Hash() string {
	return c.container.Config.Labels[labels.HASH.Str()]
}
1287467
func (data *Data) Hash() cmn.HexBytes {
	if data == nil {
		return (Txs{}).Hash()
	}
	if data.hash == nil {
		data.hash = data.Txs.Hash() // NOTE: leaves of merkle tree are TxIDs
	}
	return data.hash
}
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
}
455295
func (si SignerInfo) Hash() (crypto.Hash, error) {
	algo := si.DigestAlgorithm.Algorithm.String()
	hash := oid.DigestAlgorithmToCryptoHash[algo]
	if hash == 0 || !hash.Available() {
		return 0, ErrUnsupported
	}

	return hash, nil
}