$73 GRAYBYTE WORDPRESS FILE MANAGER $91

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.23
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/ruby34/share/ruby/openssl/

HOME
Current File : /opt/alt/ruby34/share/ruby/openssl//digest.rb
# frozen_string_literal: true
#--
# = Ruby-space predefined Digest subclasses
#
# = Info
# 'OpenSSL for Ruby 2' project
# Copyright (C) 2002  Michal Rokos <[email protected]>
# All rights reserved.
#
# = Licence
# This program is licensed under the same licence as Ruby.
# (See the file 'COPYING'.)
#++

module OpenSSL
  class Digest

    # Return the hash value computed with _name_ Digest. _name_ is either the
    # long name or short name of a supported digest algorithm.
    #
    # === Example
    #
    #   OpenSSL::Digest.digest("SHA256", "abc")

    def self.digest(name, data)
      super(data, name)
    end

    %w(MD4 MD5 RIPEMD160 SHA1 SHA224 SHA256 SHA384 SHA512).each do |name|
      klass = Class.new(self) {
        define_method(:initialize, ->(data = nil) {super(name, data)})
      }

      singleton = (class << klass; self; end)

      singleton.class_eval{
        define_method(:digest) {|data| new.digest(data)}
        define_method(:hexdigest) {|data| new.hexdigest(data)}
      }

      const_set(name.tr('-', '_'), klass)
    end

    # Deprecated.
    #
    # This class is only provided for backwards compatibility.
    # Use OpenSSL::Digest instead.
    class Digest < Digest; end # :nodoc:
    deprecate_constant :Digest

  end # Digest

  # Returns a Digest subclass by _name_
  #
  #   require 'openssl'
  #
  #   OpenSSL::Digest("MD5")
  #   # => OpenSSL::Digest::MD5
  #
  #   Digest("Foo")
  #   # => NameError: wrong constant name Foo

  def Digest(name)
    OpenSSL::Digest.const_get(name)
  end

  module_function :Digest

end # OpenSSL


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
10 Feb 2026 9.34 AM
root / linksafe
0755
asn1.rb
5.775 KB
27 Jan 2026 4.00 PM
root / linksafe
0644
bn.rb
0.69 KB
27 Jan 2026 4.00 PM
root / linksafe
0644
buffering.rb
10.476 KB
27 Jan 2026 4.00 PM
root / linksafe
0644
cipher.rb
1.703 KB
27 Jan 2026 4.00 PM
root / linksafe
0644
digest.rb
1.543 KB
27 Jan 2026 4.00 PM
root / linksafe
0644
hmac.rb
2.496 KB
27 Jan 2026 4.00 PM
root / linksafe
0644
marshal.rb
0.555 KB
27 Jan 2026 4.00 PM
root / linksafe
0644
pkcs5.rb
0.599 KB
27 Jan 2026 4.00 PM
root / linksafe
0644
pkey.rb
14.764 KB
27 Jan 2026 4.00 PM
root / linksafe
0644
ssl.rb
19.036 KB
27 Jan 2026 4.00 PM
root / linksafe
0644
version.rb
0.068 KB
27 Jan 2026 4.00 PM
root / linksafe
0644
x509.rb
11.632 KB
27 Jan 2026 4.00 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF