复制项目

This commit is contained in:
kim.dev.6789
2026-01-14 22:16:44 +08:00
parent e2577b8cee
commit e50142a3b9
691 changed files with 97009 additions and 1 deletions

16
pkg/util/hashutil/id.go Normal file
View File

@@ -0,0 +1,16 @@
package hashutil
import (
"crypto/md5"
"encoding/binary"
"encoding/json"
)
func IdHash(ids []string) uint64 {
if len(ids) == 0 {
return 0
}
data, _ := json.Marshal(ids)
sum := md5.Sum(data)
return binary.BigEndian.Uint64(sum[:])
}