tpl/images: Format the QR hashes as hex

Slightly shorter, and it looks more like a ... hash.
This commit is contained in:
Bjørn Erik Pedersen
2025-01-06 12:15:52 +01:00
parent a837976731
commit 5f2adad2c7
4 changed files with 18 additions and 11 deletions

View File

@@ -83,6 +83,13 @@ func HashString(vs ...any) string {
return strconv.FormatUint(hash, 10)
}
// HashStringHex returns a hash from the given elements as a hex encoded string.
// See HashString for more information.
func HashStringHex(vs ...any) string {
hash := HashUint64(vs...)
return strconv.FormatUint(hash, 16)
}
var hashOptsPool = sync.Pool{
New: func() any {
return &hashstructure.HashOptions{