server/pkg/tool/etag.go
Chang lue Tsen 8addcc584b init: 1.0.0
2025-04-25 12:08:29 +09:00

12 lines
166 B
Go

package tool
import (
"crypto/sha256"
"encoding/hex"
)
func GenerateETag(data []byte) string {
hash := sha256.Sum256(data)
return hex.EncodeToString(hash[:])
}