Method: RestfulController#hash

Defined in:
lib/app/controllers/concerns/restful_controller.rb

#hash(str) ⇒ Object

Create a hash of the string contents



31
32
33
34
35
36
37
# File 'lib/app/controllers/concerns/restful_controller.rb', line 31

def hash(str)
  if SystemConfiguration.fips_mode?
    Digest::SHA2.hexdigest(str)
  else
    Digest::MD5.hexdigest(str)
  end
end