new
public

Initializes a new instance. secret_generator must accept a salt, and return a suitable secret (string). secret_generator may also accept arbitrary kwargs. If #rotate is called with any options matching those kwargs, those options will be passed to secret_generator instead of to the message verifier.

verifiers = ActiveSupport::MessageVerifiers.new do |salt, base:|
  MySecretGenerator.new(base).generate(salt)
end

verifiers.rotate(base: "...")