class ActiveSupport::KeyGenerator

def generate_key(salt, key_size = 64)

i.e. OpenSSL::Digest::SHA1#block_length
to be compatible with the default settings of ActiveSupport::MessageVerifier.
Returns a derived key suitable for use. The default +key_size+ is chosen
def generate_key(salt, key_size = 64)
  OpenSSL::PKCS5.pbkdf2_hmac(@secret, salt, @iterations, key_size, @hash_digest_class.new)
end