123456789_123456789_123456789_123456789_123456789_

Class: ActiveSupport::Digest

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: activesupport/lib/active_support/digest.rb

Class Attribute Summary

Class Method Summary

Class Attribute Details

.hash_digest_class (rw)

[ GitHub ]

  
# File 'activesupport/lib/active_support/digest.rb', line 8

def hash_digest_class
  @hash_digest_class ||= OpenSSL::Digest::MD5
end

.hash_digest_class=(klass) (rw)

Raises:

  • (ArgumentError)
[ GitHub ]

  
# File 'activesupport/lib/active_support/digest.rb', line 12

def hash_digest_class=(klass)
  raise ArgumentError, "#{klass} is expected to implement hexdigest class method" unless klass.respond_to?(:hexdigest)
  @hash_digest_class = klass
end

Class Method Details

.hexdigest(arg)

[ GitHub ]

  
# File 'activesupport/lib/active_support/digest.rb', line 17

def hexdigest(arg)
  hash_digest_class.hexdigest(arg)[0...32]
end