hash.go 205 B

123456789101112
  1. package main
  2. import (
  3. "fmt"
  4. "hash/crc32"
  5. )
  6. var crc32q *crc32.Table = crc32.MakeTable(0xD5828281)
  7. func getHash(link string) string {
  8. return fmt.Sprintf("%08x", crc32.Checksum([]byte(link), crc32q))
  9. }