commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1380826 - /commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/DigestUtils.java
Date Tue, 04 Sep 2012 19:35:06 GMT
Author: ggregory
Date: Tue Sep  4 19:35:06 2012
New Revision: 1380826

URL: http://svn.apache.org/viewvc?rev=1380826&view=rev
Log:
Redirect SHA API calls to SHA-1 APIs.

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

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/DigestUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/DigestUtils.java?rev=1380826&r1=1380825&r2=1380826&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/DigestUtils.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/DigestUtils.java
Tue Sep  4 19:35:06 2012
@@ -188,7 +188,7 @@ public class DigestUtils {
      */
     @Deprecated
     public static MessageDigest getShaDigest() {
-        return getDigest("SHA");
+        return getSha1Digest();
     }
 
     /**
@@ -349,7 +349,7 @@ public class DigestUtils {
      */
     @Deprecated
     public static byte[] sha(byte[] data) {
-        return getShaDigest().digest(data);
+        return sha1(data);
     }
 
     /**
@@ -365,7 +365,7 @@ public class DigestUtils {
      */
     @Deprecated
     public static byte[] sha(InputStream data) throws IOException {
-        return digest(getShaDigest(), data);
+        return sha1(data);
     }
 
     /**
@@ -378,7 +378,7 @@ public class DigestUtils {
      */
     @Deprecated
     public static byte[] sha(String data) {
-        return sha(getBytesUtf8(data));
+        return sha1(data);
     }
 
     /**
@@ -748,7 +748,7 @@ public class DigestUtils {
      */
     @Deprecated
     public static String shaHex(byte[] data) {
-        return Hex.encodeHexString(sha(data));
+        return sha1Hex(data);
     }
 
     /**
@@ -764,7 +764,7 @@ public class DigestUtils {
      */
     @Deprecated
     public static String shaHex(InputStream data) throws IOException {
-        return Hex.encodeHexString(sha(data));
+        return sha1Hex(data);
     }
 
     /**
@@ -777,7 +777,7 @@ public class DigestUtils {
      */
     @Deprecated
     public static String shaHex(String data) {
-        return Hex.encodeHexString(sha(data));
+        return sha1Hex(data);
     }
 
     /**



Mime
View raw message