commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1744089 - /commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Digest.java
Date Mon, 16 May 2016 17:06:37 GMT
Author: sebb
Date: Mon May 16 17:06:37 2016
New Revision: 1744089

URL: http://svn.apache.org/viewvc?rev=1744089&view=rev
Log:
More standard separator

Modified:
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Digest.java

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Digest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Digest.java?rev=1744089&r1=1744088&r2=1744089&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Digest.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Digest.java Mon
May 16 17:06:37 2016
@@ -67,7 +67,11 @@ public class Digest {
 
     private void println(String prefix, final byte[] digest) {
         final String sourceDesc = source == null ? "-" : source;
-        System.out.println(prefix + Hex.encodeHexString(digest) + " " + sourceDesc);
+        // The standard appears to be to print 
+        // hex, space, then either space or '*' followed by file
+        // where '*' is used for binary files
+        // shasum(1) has a -b option which generates " *" separator
+        System.out.println(prefix + Hex.encodeHexString(digest) + "  " + sourceDesc);
     }
 
     private void run() throws IOException {



Mime
View raw message