terraform/helper/hashcode/hashcode.go

11 lines
165 B
Go
Raw Normal View History

package hashcode
import (
"hash/crc32"
)
// String hashes a string to a unique hashcode.
func String(s string) int {
return int(crc32.ChecksumIEEE([]byte(s)))
}