MCPcopy Index your code
hub / github.com/TruthHun/BookStack / IsSignUsed

Function IsSignUsed

utils/jwt.go:46–53  ·  view source on GitHub ↗

IsSignUsed 签名是否已被使用

(sign string)

Source from the content-addressed store, hash-verified

44
45// IsSignUsed 签名是否已被使用
46func IsSignUsed(sign string) bool {
47 signMD5 := MD5Sub16(sign)
48 if _, ok := usedSign.Load(signMD5); ok {
49 return true
50 }
51 usedSign.Store(signMD5, time.Now().Unix())
52 return false
53}
54
55// GenerateSign 生成token
56func GenerateMediaSign(path string, unixNano int64, expire ...time.Duration) (sign string, err error) {

Callers

nothing calls this directly

Calls 1

MD5Sub16Function · 0.85

Tested by

no test coverage detected