mirror of
https://github.com/ruby/ruby.git
synced 2025-09-20 11:03:58 +02:00
* 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
This commit is contained in:
parent
ef039de560
commit
b0fb4fb689
3 changed files with 29 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue