Skip to content

Commit cc52a7a

Browse files
committed
Add missing Javadoc @throws.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1634411 13f79535-47bb-0310-9956-ffa450edef68
1 parent 1128060 commit cc52a7a

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

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

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ public static byte[] hmacMd5(final byte[] key, final byte[] valueToDigest) {
222222
* The InputStream must not be null and will not be closed
223223
* </p>
224224
* @return HmacMD5 MAC for the given key and value
225+
* @throws IOException
226+
* If an I/O error occurs.
225227
* @throws IllegalArgumentException
226228
* when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
227229
*/
@@ -270,6 +272,8 @@ public static String hmacMd5Hex(final byte[] key, final byte[] valueToDigest) {
270272
* The InputStream must not be null and will not be closed
271273
* </p>
272274
* @return HmacMD5 MAC for the given key and value as a hex string (lowercase)
275+
* @throws IOException
276+
* If an I/O error occurs.
273277
* @throws IllegalArgumentException
274278
* when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
275279
*/
@@ -325,6 +329,8 @@ public static byte[] hmacSha1(final byte[] key, final byte[] valueToDigest) {
325329
* The InputStream must not be null and will not be closed
326330
* </p>
327331
* @return HmacSHA1 MAC for the given key and value
332+
* @throws IOException
333+
* If an I/O error occurs.
328334
* @throws IllegalArgumentException
329335
* when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
330336
*/
@@ -373,6 +379,8 @@ public static String hmacSha1Hex(final byte[] key, final byte[] valueToDigest) {
373379
* The InputStream must not be null and will not be closed
374380
* </p>
375381
* @return HmacSHA1 MAC for the given key and value as hex string (lowercase)
382+
* @throws IOException
383+
* If an I/O error occurs.
376384
* @throws IllegalArgumentException
377385
* when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
378386
*/
@@ -428,7 +436,9 @@ public static byte[] hmacSha256(final byte[] key, final byte[] valueToDigest) {
428436
* The InputStream must not be null and will not be closed
429437
* </p>
430438
* @return HmacSHA256 MAC for the given key and value
431-
* @throws IllegalArgumentException
439+
* @throws IOException
440+
* If an I/O error occurs.
441+
s * @throws IllegalArgumentException
432442
* when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
433443
*/
434444
public static byte[] hmacSha256(final byte[] key, final InputStream valueToDigest) throws IOException {
@@ -476,6 +486,8 @@ public static String hmacSha256Hex(final byte[] key, final byte[] valueToDigest)
476486
* The InputStream must not be null and will not be closed
477487
* </p>
478488
* @return HmacSHA256 MAC for the given key and value as hex string (lowercase)
489+
* @throws IOException
490+
* If an I/O error occurs.
479491
* @throws IllegalArgumentException
480492
* when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
481493
*/
@@ -531,6 +543,8 @@ public static byte[] hmacSha384(final byte[] key, final byte[] valueToDigest) {
531543
* The InputStream must not be null and will not be closed
532544
* </p>
533545
* @return HmacSHA384 MAC for the given key and value
546+
* @throws IOException
547+
* If an I/O error occurs.
534548
* @throws IllegalArgumentException
535549
* when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
536550
*/
@@ -579,6 +593,8 @@ public static String hmacSha384Hex(final byte[] key, final byte[] valueToDigest)
579593
* The InputStream must not be null and will not be closed
580594
* </p>
581595
* @return HmacSHA384 MAC for the given key and value as hex string (lowercase)
596+
* @throws IOException
597+
* If an I/O error occurs.
582598
* @throws IllegalArgumentException
583599
* when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
584600
*/
@@ -634,6 +650,8 @@ public static byte[] hmacSha512(final byte[] key, final byte[] valueToDigest) {
634650
* The InputStream must not be null and will not be closed
635651
* </p>
636652
* @return HmacSHA512 MAC for the given key and value
653+
* @throws IOException
654+
* If an I/O error occurs.
637655
* @throws IllegalArgumentException
638656
* when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
639657
*/
@@ -682,6 +700,8 @@ public static String hmacSha512Hex(final byte[] key, final byte[] valueToDigest)
682700
* The InputStream must not be null and will not be closed
683701
* </p>
684702
* @return HmacSHA512 MAC for the given key and value as hex string (lowercase)
703+
* @throws IOException
704+
* If an I/O error occurs.
685705
* @throws IllegalArgumentException
686706
* when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
687707
*/
@@ -735,8 +755,10 @@ public static Mac updateHmac(final Mac mac, final byte[] valueToDigest) {
735755
* The InputStream must not be null and will not be closed
736756
* </p>
737757
* @return the updated {@link Mac}
758+
* @throws IOException
759+
* If an I/O error occurs.
738760
* @throws IllegalStateException
739-
* if the Mac was not initialized
761+
* If the Mac was not initialized
740762
* @since 1.x
741763
*/
742764
public static Mac updateHmac(final Mac mac, final InputStream valueToDigest) throws IOException {

0 commit comments

Comments
 (0)