commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1380028 - /commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/DigestUtils.java
Date Sun, 02 Sep 2012 18:43:25 GMT
Author: ggregory
Date: Sun Sep  2 18:43:24 2012
New Revision: 1380028

URL: http://svn.apache.org/viewvc?rev=1380028&view=rev
Log:
Deprecate SHA APIs in favor of 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=1380028&r1=1380027&r2=1380028&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
Sun Sep  2 18:43:24 2012
@@ -342,7 +342,9 @@ public class DigestUtils {
      * @param data
      *            Data to digest
      * @return SHA-1 digest
+     * @deprecated Use {@link #sha1(byte[])}
      */
+    @Deprecated
     public static byte[] sha(byte[] data) {
         return getShaDigest().digest(data);
     }
@@ -356,7 +358,9 @@ public class DigestUtils {
      * @throws IOException
      *             On error reading from the stream
      * @since 1.4
+     * @deprecated Use {@link #sha1(InputStream)}
      */
+    @Deprecated
     public static byte[] sha(InputStream data) throws IOException {
         return digest(getShaDigest(), data);
     }
@@ -367,7 +371,9 @@ public class DigestUtils {
      * @param data
      *            Data to digest
      * @return SHA-1 digest
+     * @deprecated Use {@link #sha1(String)}
      */
+    @Deprecated
     public static byte[] sha(String data) {
         return sha(getBytesUtf8(data));
     }
@@ -735,7 +741,9 @@ public class DigestUtils {
      * @param data
      *            Data to digest
      * @return SHA-1 digest as a hex string
+     * @deprecated Use {@link #sha1Hex(byte[])}
      */
+    @Deprecated
     public static String shaHex(byte[] data) {
         return Hex.encodeHexString(sha(data));
     }
@@ -749,7 +757,9 @@ public class DigestUtils {
      * @throws IOException
      *             On error reading from the stream
      * @since 1.4
+     * @deprecated Use {@link #sha1Hex(InputStream)}
      */
+    @Deprecated
     public static String shaHex(InputStream data) throws IOException {
         return Hex.encodeHexString(sha(data));
     }
@@ -760,7 +770,9 @@ public class DigestUtils {
      * @param data
      *            Data to digest
      * @return SHA-1 digest as a hex string
+     * @deprecated Use {@link #sha1Hex(String)}
      */
+    @Deprecated
     public static String shaHex(String data) {
         return Hex.encodeHexString(sha(data));
     }



Mime
View raw message