Sha256: e9e7104a0608efd70da148d7dfc71ec36e8d4f3cc4b67eb146a4db995cda22f1

Contents?: true

Size: 514 Bytes

Versions: 92

Compression:

Stored size: 514 Bytes

Contents

# frozen_string_literal: true

require "openssl"

module ActiveSupport
  class Digest # :nodoc:
    class << self
      def hash_digest_class
        @hash_digest_class ||= OpenSSL::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

92 entries across 88 versions & 14 rubygems

Version Path
mlh-rubocop-config-1.0.2 vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.6/lib/active_support/digest.rb
fablicop-1.10.3 vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.6/lib/active_support/digest.rb
fablicop-1.10.3 vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.5/lib/active_support/digest.rb
activesupport-7.0.6 lib/active_support/digest.rb
activesupport-7.0.5.1 lib/active_support/digest.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activesupport-7.0.2.3/lib/active_support/digest.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/digest.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4/lib/active_support/digest.rb
fablicop-1.10.2 vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.5/lib/active_support/digest.rb
activesupport-7.0.5 lib/active_support/digest.rb
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/digest.rb
activesupport-7.0.4.3 lib/active_support/digest.rb
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4/lib/active_support/digest.rb
activesupport-7.0.4.2 lib/active_support/digest.rb
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4/lib/active_support/digest.rb
activesupport-7.0.4.1 lib/active_support/digest.rb
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4/lib/active_support/digest.rb
activesupport-7.0.4 lib/active_support/digest.rb
activesupport-7.0.3.1 lib/active_support/digest.rb
activesupport-7.0.3 lib/active_support/digest.rb