mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
dfb35dcd7a
Add a generic crypto.Hash template function returning the hex-encoded checksum of a string using one of md5, sha1, sha256 (default), sha384 or sha512. The supported algorithms match those used for the SRI hash in .Data.Integrity on fingerprinted resources, so an SRI hash can be built by composing with encoding.HexDecode and encoding.Base64Encode. Fixes #15072 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
338 B
338 B
title, description, categories, keywords, params
| title | description | categories | keywords | params | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| encoding.HexDecode | Returns the hexadecimal decoding of the given content. |
|
{{ "48656c6c6f20776f726c64" | encoding.HexDecode }} → Hello world