You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2016/05/15 18:11:54 UTC

svn commit: r1743938 - in /commons/proper/codec/trunk/src: changes/changes.xml main/java/org/apache/commons/codec/digest/MessageDigestAlgorithm.java

Author: ggregory
Date: Sun May 15 18:11:54 2016
New Revision: 1743938

URL: http://svn.apache.org/viewvc?rev=1743938&view=rev
Log:
[CODEC-213] Support JEP 287: SHA-3 Hash Algorithms

Modified:
    commons/proper/codec/trunk/src/changes/changes.xml
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/MessageDigestAlgorithm.java

Modified: commons/proper/codec/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/changes/changes.xml?rev=1743938&r1=1743937&r2=1743938&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/changes/changes.xml (original)
+++ commons/proper/codec/trunk/src/changes/changes.xml Sun May 15 18:11:54 2016
@@ -47,6 +47,7 @@ The <action> type attribute can be add,u
       <action dev="ggregory" type="fix" issue="CODEC-207" due-to="Gary Gregory">Charsets Javadoc breaks build when using Java 8</action>         
       <action dev="ggregory" type="fix" issue="CODEC-199" due-to="Yossi Tamari">Bug in HW rule in Soundex</action>         
       <action dev="ggregory" type="fix" issue="CODEC-209" due-to="Gary Gregory">Javadoc for SHA-224 DigestUtils methods should mention Java 1.8.0 restriction instead of 1.4.0.</action>         
+      <action dev="ggregory" type="add" issue="CODEC-213" due-to="Gary Gregory">Support JEP 287: SHA-3 Hash Algorithms</action>         
       <action dev="ggregory" type="add" issue="CODEC-212" due-to="Gary Gregory">Create a minimal Digest command line utility: org.apache.commons.codec.digest.Digest</action>         
       <action dev="ggregory" type="add" issue="CODEC-211" due-to="Gary Gregory">Create enum MessageDigestAlgorithm and deprecate class MessageDigestAlgorithms</action>         
       <action dev="ggregory" type="add" issue="CODEC-210" due-to="Gary Gregory">Add DigestUtils.getDigest(String, MessageDigest)</action>         

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/MessageDigestAlgorithm.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/MessageDigestAlgorithm.java?rev=1743938&r1=1743937&r2=1743938&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/MessageDigestAlgorithm.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/MessageDigestAlgorithm.java Sun May 15 18:11:54 2016
@@ -74,7 +74,39 @@ public enum MessageDigestAlgorithm {
     /**
      * The SHA-512 hash algorithm defined in the FIPS PUB 180-2.
      */
-    SHA_512("SHA-512");
+    SHA_512("SHA-512"),
+
+    /**
+     * The SHA3-224 hash algorithm defined in the NIST FIPS 202.
+     * <p>
+     * Java 9 only.
+     * </p>
+     */
+    SHA3_224("SHA3-224"),
+
+    /**
+     * The SHA3-256 hash algorithm defined in the NIST FIPS 202.
+     * <p>
+     * Java 9 only.
+     * </p>
+     */
+    SHA3_256("SHA3-256"),
+
+    /**
+     * The SHA3-384 hash algorithm defined in the NIST FIPS 202.
+     * <p>
+     * Java 9 only.
+     * </p>
+     */
+    SHA3_384("SHA3-384"),
+
+    /**
+     * The SHA3-512 hash algorithm defined in the NIST FIPS 202.
+     * <p>
+     * Java 9 only.
+     * </p>
+     */
+    SHA3_512("SHA3-512");
 
     private final String algorithm;