github.com/bengesoff/terraform@v0.3.1-0.20141018223233-b25a53629922/helper/hashcode/hashcode.go (about)

     1  package hashcode
     2  
     3  import (
     4  	"hash/crc32"
     5  )
     6  
     7  // String hashes a string to a unique hashcode.
     8  func String(s string) int {
     9  	return int(crc32.ChecksumIEEE([]byte(s)))
    10  }