Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
OpenSSL#Digest
(::interned name) -> singleton(::Digest::Base)
Digest(name)
ext/openssl/lib/openssl/digest.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/ext/openssl/lib/openssl/digest.rb, line 67
def Digest(name)
OpenSSL::Digest.const_get(name)
end
Returns a Digest subclass by name
Example
require 'openssl' OpenSSL::Digest("MD5") # => OpenSSL::Digest::MD5 OpenSSL::Digest("Foo") # => NameError: wrong constant name Foo
See also
.Digest
.secure_compare
.fixed_length_secure_compare
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0