// Hash returns the FNV hash of what.
424184
func Hash(what []byte) uint64 {
	h := fnv.New64()
	h.Write(what)
	return h.Sum64()
}
519587
func fastHash(input []byte) string {
	h := fnv.New32a()
	h.Write([]byte(input))
	return fmt.Sprintf("%x", h.Sum32())
}
1178443
func Hash(fieldVals []interface{}) uint64 {
	if len(fieldVals) == 0 {
		// Avoid allocating the hasher if there are no fieldVals
		return 0
	}
	h := fnv.New64a()

	for _, v := range fieldVals {
		switch v := v.(type) {
		case string:
			h.Write([]byte(v))
		case int64:
			b := [8]byte{}
			for i := 0; i < 8; i++ {
				b[i] = byte(v & 0xFF)
				v >>= 8
			}
			h.Write(b[:])
		case bool:
			if v {
				h.Write([]byte{1})
			} else {
				h.Write([]byte{0})
			}
		}
	}
	return h.Sum64()
}
1076828
func (c *Cons) Hash() uint32 {
	if c.hash == 0 {
		c.hash = sequtil.HashSeq(c)
	}

	return c.hash
}
107163
func (data *EvidenceData) Hash() cmn.HexBytes {
	if data.hash == nil {
		data.hash = data.Evidence.Hash()
	}
	return data.hash
}
185535
func (r *Request) Hash() string {
	h := fnv.New64()
	h.Write([]byte(fmt.Sprintf("%s.%s", r.StackId, r.RequestId)))
	return base62.Encode(h.Sum64())
}
736396
func hash(rrs []dns.RR) uint64 {
	h := fnv.New64()
	buf := make([]byte, 256)
	for _, r := range rrs {
		off, err := dns.PackRR(r, buf, 0, nil, false)
		if err == nil {
			h.Write(buf[:off])
		}
	}

	i := h.Sum64()
	return i
}
260994
func (p *Provider) Hash(plaintext []byte) []byte {
	p.setDefaultIfNeeded()
	saltBytes := salt.Generate(p.params.saltLen)
	key, _ := scrypt.Key(plaintext, saltBytes, p.params.n, p.params.r, p.params.p, p.params.keyLen)
	return mcf.Encode(providerName, p.params.String(), saltBytes, key)
}
827542
func (s *MerkleStoreImpl) hash(in keybase1.MerkleStoreKit) keybase1.MerkleStoreKitHash {
	buf := sha512.Sum512([]byte(in))
	out := hex.EncodeToString(buf[:])
	return keybase1.MerkleStoreKitHash(out)
}
1139851
func (t *NetworkDevice) Hash() uint64 {
	h := fnv.New64a()
	fmt.Fprintf(h, "%s\n%s\n%s\n%s",
		t.Metro,
		t.Role,
		t.Hostname,
		t.Hostgroup)
	return h.Sum64()
}
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)
}
1342502
func (t *Task) Hash() uint64 {
	h := fnv.New64a()
	fmt.Fprintf(h, "%s\n%s\n%s\n%s\n%d",
		t.ServiceName,
		t.JobName,
		t.DataCenter,
		t.HostName,
		t.TaskNum)
	return h.Sum64()
}
500762
func (s *set) Hash() int {
	var hash int
	s.Foreach(func(x *Term) {
		hash += x.Hash()
	})
	return hash
}
694652
func (s EIP155Signer) Hash(tx *Transaction) common.Hash {
	return rlpHash([]interface{}{
		tx.data.AccountNonce,
		tx.data.Price,
		tx.data.GasLimit,
		tx.data.Recipient,
		tx.data.Amount,
		tx.data.Payload,
		s.chainId, uint(0), uint(0),
	})
}
349606
func (p *Provider) Hash(plaintext []byte) []byte {
	pw, _ := gobcrypt.GenerateFromPassword(plaintext, int(p.Cost))
	return pw
}
1290147
func hash(s string) string {
	hash := fnv.New32a()
	hash.Write([]byte(s))
	intHash := hash.Sum32()
	result := fmt.Sprintf("%08x", intHash)
	return result
}
473324
func Hash(path string) (uint64, error) {
	file, err := os.Open(path)
	if err != nil {
		return 0, err
	}
	defer file.Close()
	return HashFile(file)
}