// New32WithSeed returns new 32-bit hasher set with explicit seed value
962476
func New32WithSeed(seed uint32) hash.Hash32 {
	d := new(digest32)
	d.seed = seed
	d.bmixer = d
	d.Reset()
	return d
}
449815
func Checksum32Seed(data []byte, seed uint32) uint32 {
	if data == nil {
		panic("Data cannot be nil.")
	}
	p := uintptr(unsafe.Pointer(&data[0]))
	l := len(data)
	bEnd := p + uintptr(l)
	h32 := uint32(0)

	if l >= 16 {
		limit := bEnd - 16

		v1 := seed + PRIME32_1 + PRIME32_2
		v2 := seed + PRIME32_2
		v3 := seed + 0
		v4 := seed - PRIME32_1
		for {
			v1 += (*(*uint32)(unsafe.Pointer(p))) * PRIME32_2
			v1 = ((v1 << 13) | (v1 >> (32 - 13))) * PRIME32_1

			v2 += (*(*uint32)(unsafe.Pointer(p + 4))) * PRIME32_2
			v2 = ((v2 << 13) | (v2 >> (32 - 13))) * PRIME32_1

			v3 += (*(*uint32)(unsafe.Pointer(p + 8))) * PRIME32_2
			v3 = ((v3 << 13) | (v3 >> (32 - 13))) * PRIME32_1

			v4 += (*(*uint32)(unsafe.Pointer(p + 12))) * PRIME32_2
			v4 = ((v4 << 13) | (v4 >> (32 - 13))) * PRIME32_1

			p += 16
			if p > limit {
				break
			}
		}
		h32 = ((v1 << 1) | (v1 >> (32 - 1))) +
			((v2 << 7) | (v2 >> (32 - 7))) +
			((v3 << 12) | (v3 >> (32 - 12))) +
			((v4 << 18) | (v4 >> (32 - 18)))
	} else {
		h32 = seed + PRIME32_5
	}

	h32 += uint32(l)

	for p <= bEnd-4 {
		h32 += (*(*uint32)(unsafe.Pointer(p))) * PRIME32_3
		h32 = ((h32 << 17) | (h32 >> (32 - 17))) * PRIME32_4
		p += 4
	}

	for p < bEnd {
		h32 += uint32(*(*byte)(unsafe.Pointer(p))) * PRIME32_5
		h32 = ((h32 << 11) | (h32 >> (32 - 11))) * PRIME32_1
		p++
	}

	h32 ^= h32 >> 15
	h32 *= PRIME32_2
	h32 ^= h32 >> 13
	h32 *= PRIME32_3
	h32 ^= h32 >> 16

	return h32
}
483578
func New(key Key, padding int, initCtr uint32, hashFunc func() hash.Hash) *encryption {
	return &encryption{
		key:      key,
		keyLen:   len(key),
		padding:  padding,
		initCtr:  initCtr,
		hashFunc: hashFunc,
	}
}
895941
func NewPool(seed int64, size uint64) *Pool {
	groupsize := nextNearestPow2uint64(size)
	pool := &Pool{
		size:    groupsize,
		sources: make([]NumberGenerator, groupsize),
	}
	// seed the pool
	pool.seed(seed)
	return pool
}
380466
func NewWithShard(shardCount uint8) *SyncMap {
	if !isPowerOfTwo(shardCount) {
		shardCount = defaultShardCount
	}
	m := new(SyncMap)
	m.shardCount = shardCount
	m.shards = make([]*syncMap, m.shardCount)
	for i, _ := range m.shards {
		m.shards[i] = &syncMap{items: make(map[string]interface{})}
	}
	return m
}
151395
func (h *HLL) AddWithHasher(value string, hasher func(string) uint64) {
	hash := hasher(value)
	h.AddHash(hash)
}
887833
func NewInt32(v int32) Value {
	return MakeTrusted(Int32, strconv.AppendInt(nil, int64(v), 10))
}
851776
func NewPcg32(seed uint64) Pcg32 {
  lcg := lcglib.NewLcg64(seed)
  return Pcg32{NewPcg64x32(lcg, XshRr)}
}
516095
func NewFromHash(hashedKey string) (Crypter, error) {
	var f func() Crypter

	if strings.HasPrefix(hashedKey, cryptPrefixes[SHA512]) {
		f = crypts[SHA512]
	} else if strings.HasPrefix(hashedKey, cryptPrefixes[SHA256]) {
		f = crypts[SHA256]
	} else if strings.HasPrefix(hashedKey, cryptPrefixes[MD5]) {
		f = crypts[MD5]
	} else if strings.HasPrefix(hashedKey, cryptPrefixes[APR1]) {
		f = crypts[APR1]
	}

	if f != nil {
		return f(), nil
	}

	return nil, errors.New("Invalid hash")
}
1047837
func NewMersennePrime32() *MT19937 {
	m := New32()
	prime, err := rand.Prime(rand.Reader, 64)
	if err != nil {
		panic(err)
	}
	m.Seed(prime.Int64())
	return m
}
585060
func NewHash(pos int, line int) *Hash {
	return &Hash{
		NodeType: NodeHash,
		Loc:      Loc{pos, line},
	}
}
736350
func New(seed uint64) hash.Hash64 {
	xxh := &xxHash{seed: seed}
	xxh.Reset()
	return xxh
}
758006
func New(key []byte) (hash.Hash, error) {
	if len(key) != Size {
		return nil, errKeySize
	}
	h := &digest{size: Size}
	copy(h.key[:], key)
	h.Reset()
	return h, nil
}
279455
func MurmurHash64A(data []byte, seed uint64) (h uint64) {
	var k uint64

	h = seed ^ uint64(len(data))*BIG_M

	for l := len(data); l >= 8; l -= 8 {
		k = uint64(data[0]) | uint64(data[1])<<8 | uint64(data[2])<<16 | uint64(data[3])<<24 |
			uint64(data[4])<<32 | uint64(data[5])<<40 | uint64(data[6])<<48 | uint64(data[7])<<56

		k *= BIG_M
		k ^= k >> BIG_R
		k *= BIG_M

		h ^= k
		h *= BIG_M

		data = data[8:]
	}

	switch len(data) {
	case 7:
		h ^= uint64(data[6]) << 48
		fallthrough
	case 6:
		h ^= uint64(data[5]) << 40
		fallthrough
	case 5:
		h ^= uint64(data[4]) << 32
		fallthrough
	case 4:
		h ^= uint64(data[3]) << 24
		fallthrough
	case 3:
		h ^= uint64(data[2]) << 16
		fallthrough
	case 2:
		h ^= uint64(data[1]) << 8
		fallthrough
	case 1:
		h ^= uint64(data[0])
		h *= BIG_M
	}

	h ^= h >> BIG_R
	h *= BIG_M
	h ^= h >> BIG_R

	return
}
728365
func NewFileHash(path string, fi os.FileInfo) (hash.Hash, error) {
	var link string
	if fi.Mode()&os.ModeSymlink != 0 {
		var err error
		link, err = os.Readlink(path)
		if err != nil {
			return nil, err
		}
	}

	stat := &fstypes.Stat{
		Mode:     uint32(fi.Mode()),
		Size_:    fi.Size(),
		ModTime:  fi.ModTime().UnixNano(),
		Linkname: link,
	}

	if fi.Mode()&os.ModeSymlink != 0 {
		stat.Mode = stat.Mode | 0777
	}

	if err := setUnixOpt(path, fi, stat); err != nil {
		return nil, err
	}
	return NewFromStat(stat)
}
1160238
func New(hashsize int, conf *skein.Config) hash.Hash {
	s := new(hashFunc)
	s.initialize(hashsize, conf)
	return s
}
519587
func fastHash(input []byte) string {
	h := fnv.New32a()
	h.Write([]byte(input))
	return fmt.Sprintf("%x", h.Sum32())
}