Skip to content

Commit b1d11d9

Browse files
committed
Javadoc corrections
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1744239 13f79535-47bb-0310-9956-ffa450edef68
1 parent 83c4b1c commit b1d11d9

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,11 @@ public enum HmacAlgorithms {
6363
HMAC_SHA_1("HmacSHA1"),
6464

6565
/**
66-
* The HmacSHA256 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.
66+
* The HmacSHA224 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.
6767
* <p>
68-
* Every implementation of the Java platform is required to support this standard MAC algorithm.
68+
* Every implementation of the Java 8+ platform is required to support this standard MAC algorithm.
6969
* </p>
70+
* @since 1.11
7071
*/
7172
HMAC_SHA_224("HmacSHA224"),
7273

@@ -113,6 +114,7 @@ private HmacAlgorithms(final String algorithm) {
113114
* @see Mac#init(Key)
114115
* @throws IllegalArgumentException
115116
* when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
117+
* @since 1.11
116118
*/
117119
public Mac getHmac(final byte[] key) {
118120
return HmacUtils.getInitializedMac(name, key);
@@ -128,6 +130,7 @@ public Mac getHmac(final byte[] key) {
128130
* @see Mac#init(Key)
129131
* @throws IllegalArgumentException
130132
* when key is null or invalid.
133+
* @since 1.11
131134
*/
132135
public Mac getInitializedMac(final byte[] key) {
133136
return HmacUtils.getInitializedMac(name, key);
@@ -137,6 +140,7 @@ public Mac getInitializedMac(final byte[] key) {
137140
* Gets the algorithm name.
138141
*
139142
* @return the algorithm name.
143+
* @since 1.11
140144
*/
141145
public String getName() {
142146
return name;
@@ -152,6 +156,7 @@ public String getName() {
152156
* @return HMAC for the given key and value
153157
* @throws IllegalArgumentException
154158
* when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
159+
* @since 1.11
155160
*/
156161
public byte[] hmac(final byte[] key, final byte[] valueToDigest) {
157162
try {
@@ -174,6 +179,7 @@ public byte[] hmac(final byte[] key, final byte[] valueToDigest) {
174179
* If an I/O error occurs.
175180
* @throws IllegalArgumentException
176181
* when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
182+
* @since 1.11
177183
*/
178184
public byte[] hmac(final byte[] key, final InputStream valueToDigest) throws IOException {
179185
return HmacUtils.updateHmac(getHmac(key), valueToDigest).doFinal();
@@ -189,6 +195,7 @@ public byte[] hmac(final byte[] key, final InputStream valueToDigest) throws IOE
189195
* @return HMAC for the given key and value
190196
* @throws IllegalArgumentException
191197
* when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
198+
* @since 1.11
192199
*/
193200
public byte[] hmac(final String key, final String valueToDigest) {
194201
return hmac(StringUtils.getBytesUtf8(key), StringUtils.getBytesUtf8(valueToDigest));
@@ -204,6 +211,7 @@ public byte[] hmac(final String key, final String valueToDigest) {
204211
* @return HMAC for the given key and value as a hex string (lowercase)
205212
* @throws IllegalArgumentException
206213
* when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
214+
* @since 1.11
207215
*/
208216
public String hmacHex(final byte[] key, final byte[] valueToDigest) {
209217
return Hex.encodeHexString(hmac(key, valueToDigest));
@@ -221,6 +229,7 @@ public String hmacHex(final byte[] key, final byte[] valueToDigest) {
221229
* If an I/O error occurs.
222230
* @throws IllegalArgumentException
223231
* when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
232+
* @since 1.11
224233
*/
225234
public String hmacHex(final byte[] key, final InputStream valueToDigest) throws IOException {
226235
return Hex.encodeHexString(hmac(key, valueToDigest));
@@ -236,6 +245,7 @@ public String hmacHex(final byte[] key, final InputStream valueToDigest) throws
236245
* @return HMAC for the given key and value as a hex string (lowercase)
237246
* @throws IllegalArgumentException
238247
* when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
248+
* @since 1.11
239249
*/
240250
public String hmacHex(final String key, final String valueToDigest) {
241251
return Hex.encodeHexString(hmac(key, valueToDigest));
@@ -245,6 +255,7 @@ public String hmacHex(final String key, final String valueToDigest) {
245255
* Returns whether this algorithm is available
246256
*
247257
* @return whether this algorithm is available
258+
* @since 1.11
248259
*/
249260
public boolean isAvailable() {
250261
try {

0 commit comments

Comments
 (0)