module SamlIdp::Algorithmable

Private Instance Methods

algorithm() click to toggle source
# File lib/saml_idp/algorithmable.rb, line 3
def algorithm
  algorithm_check = raw_algorithm || SamlIdp.config.algorithm
  return algorithm_check if algorithm_check.respond_to?(:digest)
  begin
    OpenSSL::Digest.const_get(algorithm_check.to_s.upcase)
  rescue NameError
    OpenSSL::Digest::SHA1
  end
end
algorithm_name() click to toggle source
# File lib/saml_idp/algorithmable.rb, line 14
def algorithm_name
  algorithm.to_s.split('::').last.downcase
end