[前][次][番号順一覧][スレッド一覧]

ruby-changes:33854

From: nobu <ko1@a...>
Date: Tue, 13 May 2014 19:09:52 +0900 (JST)
Subject: [ruby-changes:33854] nobu:r45935 (trunk): make-snapshot: SHA512

nobu	2014-05-13 19:09:43 +0900 (Tue, 13 May 2014)

  New Revision: 45935

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45935

  Log:
    make-snapshot: SHA512
    
    * tool/make-snapshot (package): add SHA512.

  Modified files:
    trunk/tool/make-snapshot
Index: tool/make-snapshot
===================================================================
--- tool/make-snapshot	(revision 45934)
+++ tool/make-snapshot	(revision 45935)
@@ -27,6 +27,7 @@ each versions may be followed by optiona https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L27
 USAGE
 end
 
+DIGESTS = %w[MD5 SHA256 SHA512]
 PACKAGES = {
   "bzip" => %w".tar.bz2 bzip2 -c",
   "gzip" => %w".tar.gz  gzip -c",
@@ -325,9 +326,9 @@ revisions.collect {|rev| package(rev, de https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L326
   sha = Digest::SHA256.hexdigest str
   puts "* #{name}"
   puts "  SIZE:   #{str.bytesize} bytes"
-  puts "  MD5:    #{md5}"
-  puts "  SHA256: #{sha}"
-  puts
+  DIGESTS.each do |alg|
+    printf "  %-8s%s\n", "#{alg}:", Digest.const_get(alg).hexdigest(str)
+  end
 end
 
 exit false if !success

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]