diff options
Diffstat (limited to 'ext/openssl/lib/openssl/digest.rb')
-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 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 |