module Roda::RodaPlugins::Assets::ClassMethods
def asset_digest(content)
a different digest type or to return a static string if you don't
SHA256 hash of the content. This method can be overridden to use
Return a unique id for the given content. By default, uses the
def asset_digest(content) algo = assets_opts[:sri] || :sha256 digest = begin require 'openssl' ::OpenSSL::Digest # :nocov: rescue LoadError require 'digest/sha2' ::Digest # :nocov: end digest.const_get(algo.to_s.upcase).hexdigest(content) end