summaryrefslogtreecommitdiff
path: root/ext/openssl/lib
diff options
context:
space:
mode:
authortechnorama <technorama@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-25 08:48:57 +0000
committertechnorama <technorama@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-25 08:48:57 +0000
commit00be63fca5e636383207c8916cce8c61b2059985 (patch)
treedbc1ea8b93c869760ff0c93b78bffe5f4dd2de6b /ext/openssl/lib
parentc971b7a0b99aa07cf7804ed11388a03712c9176b (diff)
Mon Feb 25 17:30:29 2008 Technorama Ltd. <oss-ruby@technorama.net>
* 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/branches/ruby_1_8@15600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/lib')
-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