github.com/aristanetworks/goarista@v0.0.0-20240514173732-cca2755bbd44/key/hash_119.go (about)

     1  // Copyright (c) 2022 Arista Networks, Inc.
     2  // Use of this source code is governed by the Apache License 2.0
     3  // that can be found in the COPYING file.
     4  
     5  //go:build go1.19
     6  
     7  package key
     8  
     9  import (
    10  	"hash/maphash"
    11  )
    12  
    13  func hashBytes(seed maphash.Seed, v []byte) uint64 {
    14  	return maphash.Bytes(seed, v)
    15  }
    16  
    17  func hashString(seed maphash.Seed, v string) uint64 {
    18  	return maphash.String(seed, v)
    19  }