зеркало из https://github.com/github/ruby.git
* ext/openssl/lib/digest.rb: added SHA224, SHA256, SHA384 and SHA512.
these features are enabled if this library is compiled with OpenSSL 0.9.8 or later. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
8a94b1740a
Коммит
bfb1ed598c
|
@ -1,3 +1,9 @@
|
|||
Tue Aug 23 06:07:02 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||
|
||||
* ext/openssl/lib/digest.rb: added SHA224, SHA256, SHA384 and SHA512.
|
||||
these features are enabled if this library is compiled with
|
||||
OpenSSL 0.9.8 or later.
|
||||
|
||||
Tue Aug 23 05:47:04 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||
|
||||
* ext/openssl/ossl_ns_spki.c (ossl_spki_initialize): try to decode
|
||||
|
|
|
@ -21,8 +21,13 @@
|
|||
module OpenSSL
|
||||
module Digest
|
||||
|
||||
%w(DSS DSS1 MD2 MD4 MD5 MDC2 RIPEMD160 SHA SHA1).each{|digest|
|
||||
eval(<<-EOD)
|
||||
alg = %w(DSS DSS1 MD2 MD4 MD5 MDC2 RIPEMD160 SHA SHA1)
|
||||
if OPENSSL_VERSION_NUMBER > 0x00908000
|
||||
alg += %w(SHA224 SHA256 SHA384 SHA512)
|
||||
end
|
||||
|
||||
alg.each{|digest|
|
||||
self.module_eval(<<-EOD)
|
||||
class #{digest} < Digest
|
||||
def initialize(data=nil)
|
||||
super(\"#{digest}\", data)
|
||||
|
|
Загрузка…
Ссылка в новой задаче