From: Bjørn Erik Pedersen Date: Sun, 8 Feb 2026 15:38:42 +0000 (+0100) Subject: tpl: Move from md5 to xxhash for some in memory keys X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8ae5e1a8be5c44b15f45d4707083ae2e8bd2b6c0;p=brevno-suite%2Fhugo tpl: Move from md5 to xxhash for some in memory keys --- diff --git a/tpl/templates/templates.go b/tpl/templates/templates.go index 5f7db243c..77efcdf62 100644 --- a/tpl/templates/templates.go +++ b/tpl/templates/templates.go @@ -131,7 +131,7 @@ func (ns *Namespace) DoDefer(ctx context.Context, id string, optsv any) string { templateName := id var key string if opts.Key != "" { - key = hashing.MD5FromStringHexEncoded(opts.Key) + key = hashing.XxHashFromStringHexEncoded(opts.Key) } else { key = strconv.FormatUint(defferedIDCounter.Add(1), 10) } diff --git a/tpl/transform/unmarshal.go b/tpl/transform/unmarshal.go index d0edda453..2a2a526dd 100644 --- a/tpl/transform/unmarshal.go +++ b/tpl/transform/unmarshal.go @@ -125,7 +125,7 @@ func (ns *Namespace) Unmarshal(args ...any) (any, error) { return nil, nil } - key := hashing.MD5FromStringHexEncoded(dataStr) + key := hashing.XxHashFromStringHexEncoded(dataStr) if decoder != metadecoders.Default { key += decoder.OptionsKey()