Sha256: 4c83aa44861ecf17c17082c6013e9844bc027bf374ffef5585c24aaf760db523

Contents?: true

Size: 486 Bytes

Versions: 122

Compression:

Stored size: 486 Bytes

Contents

# frozen_string_literal: true

module ActiveSupport
  class Digest #:nodoc:
    class <<self
      def hash_digest_class
        @hash_digest_class ||= ::Digest::MD5
      end

      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

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

Version data entries

122 entries across 113 versions & 15 rubygems

Version Path
activesupport-6.0.0.rc2 lib/active_support/digest.rb
zuora_connect_ui-0.7.1 vendor/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/digest.rb
zuora_connect_ui-0.7.0 vendor/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/digest.rb
ric-0.13.0 vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/digest.rb
ric-0.12.2 vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/digest.rb
activesupport-6.0.0.rc1 lib/active_support/digest.rb
activesupport-5.2.3 lib/active_support/digest.rb
activesupport-5.2.3.rc1 lib/active_support/digest.rb
activesupport-6.0.0.beta3 lib/active_support/digest.rb
activesupport-5.2.2.1 lib/active_support/digest.rb
activesupport-6.0.0.beta2 lib/active_support/digest.rb
activesupport-6.0.0.beta1 lib/active_support/digest.rb
nullifyable-0.1.0 vendor/bundle/gems/activesupport-5.2.2/lib/active_support/digest.rb
activesupport-5.2.2 lib/active_support/digest.rb
activesupport-5.2.2.rc1 lib/active_support/digest.rb
activesupport-5.2.1.1 lib/active_support/digest.rb
activesupport-5.2.1 lib/active_support/digest.rb
activesupport-5.2.1.rc1 lib/active_support/digest.rb
monero_wallet_gen-0.1.0 vendor/bundle/ruby/2.3.0/gems/activesupport-5.2.0/lib/active_support/digest.rb
activesupport-5.2.0 lib/active_support/digest.rb