diff options
| author | technorama <technorama@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-25 08:51:18 +0000 |
|---|---|---|
| committer | technorama <technorama@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-25 08:51:18 +0000 |
| commit | 11cd69f2804fe85a3b9c7c5115678bcc2088f676 (patch) | |
| tree | a87faa39f22a2353ef5d33f284db632c37b7d521 /ext/openssl/lib | |
| parent | 1da1a7c7b817ae545f4580e010c5d3d34bb62cb6 (diff) | |
| download | ruby-11cd69f2804fe85a3b9c7c5115678bcc2088f676.tar.gz ruby-11cd69f2804fe85a3b9c7c5115678bcc2088f676.tar.xz ruby-11cd69f2804fe85a3b9c7c5115678bcc2088f676.zip | |
* ext/openssl/digest.c ext/openssl/lib/openssl/digest.rb:
Commit patch #9280 from Akinori MUSHA.
Simplify the OpenSSL::Digest class and make use of the
existing Digest framework.
Enhance performance.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/lib')
| -rw-r--r-- | ext/openssl/lib/openssl/digest.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/openssl/lib/openssl/digest.rb b/ext/openssl/lib/openssl/digest.rb index 8d7df73b5..4810f0121 100644 --- a/ext/openssl/lib/openssl/digest.rb +++ b/ext/openssl/lib/openssl/digest.rb @@ -26,6 +26,10 @@ module OpenSSL alg += %w(SHA224 SHA256 SHA384 SHA512) end + def self.digest(name, data) + super(data, name) + end + alg.each{|name| klass = Class.new(Digest){ define_method(:initialize){|*data| @@ -46,7 +50,10 @@ module OpenSSL # This class is only provided for backwards compatibility. Use OpenSSL::Digest in the future. class Digest < Digest - # add warning + def initialize(*args) + # add warning + super(*args) + end end end # Digest |
