summaryrefslogtreecommitdiff
path: root/ext/openssl/lib/openssl
diff options
context:
space:
mode:
authortechnorama <technorama@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-25 08:51:18 +0000
committertechnorama <technorama@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-25 08:51:18 +0000
commit3ec97f3732ff78aff36ca04153a7a4b4a82bf2c2 (patch)
treea87faa39f22a2353ef5d33f284db632c37b7d521 /ext/openssl/lib/openssl
parent1ccaaf1ad5e534463524ed2e17c7fa28f4c20701 (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@15602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/lib/openssl')
-rw-r--r--ext/openssl/lib/openssl/digest.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/openssl/lib/openssl/digest.rb b/ext/openssl/lib/openssl/digest.rb
index 8d7df73b54..4810f0121b 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