diff options
Diffstat (limited to 'ext/openssl/lib')
-rw-r--r-- | ext/openssl/lib/openssl/digest.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/openssl/lib/openssl/digest.rb b/ext/openssl/lib/openssl/digest.rb index d841fef242..40fc08066b 100644 --- a/ext/openssl/lib/openssl/digest.rb +++ b/ext/openssl/lib/openssl/digest.rb @@ -22,6 +22,17 @@ module OpenSSL alg += %w(SHA224 SHA256 SHA384 SHA512) end + # Return the +data+ hash computed with +name+ Digest. +name+ is either the + # long name or short name of a supported digest algorithm. + # + # === Examples + # + # OpenSSL::Digest.digest("SHA256, "abc") + # + # which is equivalent to: + # + # OpenSSL::Digest::SHA256.digest("abc") + def self.digest(name, data) super(data, name) end |