Skip to content

Commit 8bac2b6

Browse files
committed
CODEC-221 HmacUtils.updateHmac calls reset() unnecessarily
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1744597 13f79535-47bb-0310-9956-ffa450edef68
1 parent 516f688 commit 8bac2b6

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

src/changes/changes.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ The <action> type attribute can be add,update,fix,remove.
4242
<author>Apache Commons Developers</author>
4343
</properties>
4444
<body>
45-
<release version="1.11" date="DD MM 2015" description="Feature and fix release.">
46-
<action dev="sebb" type="fix" issue="CODEC-200" due-to="Luciano Vernaschi">Base32.HEX_DECODE_TABLE contains the wrong value 32</action>
45+
<release version="1.11" date="DD MM 2015" description="Feature and fix release.">
46+
<!-- The first attribute below should be the issue id; makes it easier to navigate in the IDE outline -->
47+
<action issue="CODEC-221" dev="sebb" type="update">HmacUtils.updateHmac calls reset() unnecessarily</action>
48+
<action issue="CODEC-200" dev="sebb" type="fix" due-to="Luciano Vernaschi">Base32.HEX_DECODE_TABLE contains the wrong value 32</action>
4749
<action dev="ggregory" type="fix" issue="CODEC-207" due-to="Gary Gregory">Charsets Javadoc breaks build when using Java 8</action>
4850
<action dev="ggregory" type="fix" issue="CODEC-199" due-to="Yossi Tamari">Bug in HW rule in Soundex</action>
4951
<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>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ public static String hmacSha512Hex(final String key, final String valueToDigest)
792792
// update
793793

794794
/**
795-
* Updates the given {@link Mac} with the value.
795+
* Resets and then updates the given {@link Mac} with the value.
796796
*
797797
* @param mac
798798
* the initialized {@link Mac} to update
@@ -809,7 +809,7 @@ public static Mac updateHmac(final Mac mac, final byte[] valueToDigest) {
809809
}
810810

811811
/**
812-
* Updates the given {@link Mac} with the value.
812+
* Resets and then updates the given {@link Mac} with the value.
813813
*
814814
* @param mac
815815
* the initialized {@link Mac} to update
@@ -838,7 +838,7 @@ public static Mac updateHmac(final Mac mac, final InputStream valueToDigest) thr
838838
}
839839

840840
/**
841-
* Updates the given {@link Mac} with the value.
841+
* Resets and then updates the given {@link Mac} with the value.
842842
*
843843
* @param mac
844844
* the initialized {@link Mac} to update

0 commit comments

Comments
 (0)