module Roda::RodaPlugins::HmacPaths::InstanceMethods
def hmac_path_hmac_secret(root, opts=OPTS)
using the secret given in the plugin, for the given root and options.
The secret used to calculate the HMAC in hmac_path. This is itself an HMAC, created
def hmac_path_hmac_secret(root, opts=OPTS) secret = opts[:secret] || self.opts[:hmac_paths_secret] if namespace = hmac_path_namespace(opts) secret = OpenSSL::HMAC.digest(OpenSSL::Digest::SHA256.new, secret, namespace) end OpenSSL::HMAC.hexdigest(OpenSSL::Digest::SHA256.new, secret, root) end