Skip to content

Commit e7b0dde

Browse files
committed
[CODEC-217] Add HmacAlgorithms.HMAC_SHA_224 (Java 8 only)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1743952 13f79535-47bb-0310-9956-ffa450edef68
1 parent a9b17e3 commit e7b0dde

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/changes/changes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ The <action> type attribute can be add,update,fix,remove.
4747
<action dev="ggregory" type="fix" issue="CODEC-207" due-to="Gary Gregory">Charsets Javadoc breaks build when using Java 8</action>
4848
<action dev="ggregory" type="fix" issue="CODEC-199" due-to="Yossi Tamari">Bug in HW rule in Soundex</action>
4949
<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>
50+
<action dev="ggregory" type="add" issue="CODEC-217" due-to="Gary Gregory">Add HmacAlgorithms.HMAC_SHA_224 (Java 8 only)</action>
5051
<action dev="ggregory" type="add" issue="CODEC-213" due-to="Gary Gregory">Support JEP 287: SHA-3 Hash Algorithms</action>
5152
<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>
5253
<action dev="ggregory" type="add" issue="CODEC-211" due-to="Gary Gregory">Create enum MessageDigestAlgorithm and deprecate class MessageDigestAlgorithms</action>

src/main/java/org/apache/commons/codec/digest/HmacAlgorithms.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ public enum HmacAlgorithms {
4848
*/
4949
HMAC_SHA_1("HmacSHA1"),
5050

51+
/**
52+
* The HmacSHA256 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.
53+
* <p>
54+
* Every implementation of the Java 8 platform is required to support this standard Mac algorithm.
55+
* </p>
56+
*/
57+
HMAC_SHA_224("HmacSHA224"),
58+
5159
/**
5260
* The HmacSHA256 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.
5361
* <p>
@@ -90,5 +98,5 @@ private HmacAlgorithms(final String algorithm) {
9098
public String toString() {
9199
return algorithm;
92100
}
93-
101+
94102
}

0 commit comments

Comments
 (0)