summaryrefslogtreecommitdiff
path: root/ext/openssl/lib/openssl/digest.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-25 00:29:02 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-25 00:29:02 +0000
commitb0fb4fb689062826730d0712a685787daf796b9a (patch)
tree04cc28bdbc36a05cf0ad16730da9bab87349c1c4 /ext/openssl/lib/openssl/digest.rb
parentef039de5604582fbf87aea2dbc9a28697423aa51 (diff)
* ext/openssl/ossl_digest.c: Document OpenSSL::Digest::digest and add
an example to OpenSSL::Digest. Patch by Sylvain Daubert. [Ruby 1.9 - Bug #5166] * ext/openssl/lib/openssl/digest.rb (module OpenSSL): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/lib/openssl/digest.rb')
-rw-r--r--ext/openssl/lib/openssl/digest.rb11
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