|
25 | 25 | * <p> |
26 | 26 | * This class is immutable and thread-safe. |
27 | 27 | * </p> |
28 | | - * |
| 28 | + * <p> |
| 29 | + * Java 8 and up: SHA-224. |
| 30 | + * </p> |
| 31 | + * <p> |
| 32 | + * Java 9 and up: SHA3-224, SHA3-256, SHA3-384, SHA3-512. |
| 33 | + * </p> |
| 34 | + * |
29 | 35 | * @see <a href="http://docs.oracle.com/javase/6/docs/technotes/guides/security/StandardNames.html">Java Cryptography |
30 | 36 | * Architecture Standard Algorithm Name Documentation</a> |
31 | 37 | * @since 1.7 // * @deprecated Use the enum {@link MessageDigestAlgorithm}. |
@@ -74,14 +80,54 @@ public class MessageDigestAlgorithms { |
74 | 80 | */ |
75 | 81 | public static final String SHA_512 = "SHA-512"; |
76 | 82 |
|
| 83 | + /** |
| 84 | + * The SHA3-224 hash algorithm defined in the FIPS PUB 180-4. |
| 85 | + * <p> |
| 86 | + * Present in Oracle Java 9. |
| 87 | + * </p> |
| 88 | + * |
| 89 | + * @since 1.11 |
| 90 | + */ |
| 91 | + public static final String SHA3_224 = "SHA3_224"; |
| 92 | + |
| 93 | + /** |
| 94 | + * The SHA3-256 hash algorithm defined in the FIPS PUB 180-4. |
| 95 | + * <p> |
| 96 | + * Present in Oracle Java 9. |
| 97 | + * </p> |
| 98 | + * |
| 99 | + * @since 1.11 |
| 100 | + */ |
| 101 | + public static final String SHA3_256 = "SHA3-256"; |
| 102 | + |
| 103 | + /** |
| 104 | + * The SHA3-384 hash algorithm defined in the FIPS PUB 180-4. |
| 105 | + * <p> |
| 106 | + * Present in Oracle Java 9. |
| 107 | + * </p> |
| 108 | + * |
| 109 | + * @since 1.11 |
| 110 | + */ |
| 111 | + public static final String SHA3_384 = "SHA3-384"; |
| 112 | + |
| 113 | + /** |
| 114 | + * The SHA3-512 hash algorithm defined in the FIPS PUB 180-4. |
| 115 | + * <p> |
| 116 | + * Present in Oracle Java 9. |
| 117 | + * </p> |
| 118 | + * |
| 119 | + * @since 1.11 |
| 120 | + */ |
| 121 | + public static final String SHA3_512 = "SHA3-512"; |
| 122 | + |
77 | 123 | /** |
78 | 124 | * Gets all constant values defined in this class. |
79 | 125 | * |
80 | 126 | * @return all constant values defined in this class. |
81 | 127 | * @since 1.11 |
82 | 128 | */ |
83 | 129 | public static String[] values() { |
84 | | - return new String[] { MD2, MD5, SHA_1, SHA_224, SHA_256, SHA_384, SHA_512 }; |
| 130 | + return new String[] { MD2, MD5, SHA_1, SHA_224, SHA_256, SHA_384, SHA_512, SHA3_224, SHA3_256, SHA3_384, SHA3_512 }; |
85 | 131 | } |
86 | 132 |
|
87 | 133 | private MessageDigestAlgorithms() { |
|
0 commit comments