There are some openssl bindings for Go though I'm not sure they'd be required if a binary representation of the read file contents can be generated during the build as shown above with the fictitious string.ToBinary function. Having the capability to generate integrity attributes would help themes developers provide additional security for their users and eliminate this job:
I'd like to be able to generate the value of an
integrity
attribute in my hugo template given a hashing function, e.g.There are some
openssl
bindings for Go though I'm not sure they'd be required if a binary representation of the read file contents can be generated during the build as shown above with the fictitiousstring.ToBinary
function. Having the capability to generateintegrity
attributes would help themes developers provide additional security for their users and eliminate this job:https://github.com/gcushen/hugo-academic/blob/master/data/sri.toml#L16-L18