You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2014/10/27 01:35:43 UTC

svn commit: r1634411 - /commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/HmacUtils.java

Author: ggregory
Date: Mon Oct 27 00:35:43 2014
New Revision: 1634411

URL: http://svn.apache.org/r1634411
Log:
Add missing Javadoc @throws.

Modified:
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/HmacUtils.java

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/HmacUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/HmacUtils.java?rev=1634411&r1=1634410&r2=1634411&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/HmacUtils.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/HmacUtils.java Mon Oct 27 00:35:43 2014
@@ -222,6 +222,8 @@ public final class HmacUtils {
      *            The InputStream must not be null and will not be closed
      *            </p>
      * @return HmacMD5 MAC for the given key and value
+     * @throws IOException
+     *             If an I/O error occurs.
      * @throws IllegalArgumentException
      *             when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
      */
@@ -270,6 +272,8 @@ public final class HmacUtils {
      *            The InputStream must not be null and will not be closed
      *            </p>
      * @return HmacMD5 MAC for the given key and value as a hex string (lowercase)
+     * @throws IOException
+     *             If an I/O error occurs.
      * @throws IllegalArgumentException
      *             when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
      */
@@ -325,6 +329,8 @@ public final class HmacUtils {
      *            The InputStream must not be null and will not be closed
      *            </p>
      * @return HmacSHA1 MAC for the given key and value
+     * @throws IOException
+     *             If an I/O error occurs.
      * @throws IllegalArgumentException
      *             when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
      */
@@ -373,6 +379,8 @@ public final class HmacUtils {
      *            The InputStream must not be null and will not be closed
      *            </p>
      * @return HmacSHA1 MAC for the given key and value as hex string (lowercase)
+     * @throws IOException
+     *             If an I/O error occurs.
      * @throws IllegalArgumentException
      *             when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
      */
@@ -428,7 +436,9 @@ public final class HmacUtils {
      *            The InputStream must not be null and will not be closed
      *            </p>
      * @return HmacSHA256 MAC for the given key and value
-     * @throws IllegalArgumentException
+     * @throws IOException
+     *             If an I/O error occurs.
+s     * @throws IllegalArgumentException
      *             when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
      */
     public static byte[] hmacSha256(final byte[] key, final InputStream valueToDigest) throws IOException {
@@ -476,6 +486,8 @@ public final class HmacUtils {
      *            The InputStream must not be null and will not be closed
      *            </p>
      * @return HmacSHA256 MAC for the given key and value as hex string (lowercase)
+     * @throws IOException
+     *             If an I/O error occurs.
      * @throws IllegalArgumentException
      *             when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
      */
@@ -531,6 +543,8 @@ public final class HmacUtils {
      *            The InputStream must not be null and will not be closed
      *            </p>
      * @return HmacSHA384 MAC for the given key and value
+     * @throws IOException
+     *             If an I/O error occurs.
      * @throws IllegalArgumentException
      *             when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
      */
@@ -579,6 +593,8 @@ public final class HmacUtils {
      *            The InputStream must not be null and will not be closed
      *            </p>
      * @return HmacSHA384 MAC for the given key and value as hex string (lowercase)
+     * @throws IOException
+     *             If an I/O error occurs.
      * @throws IllegalArgumentException
      *             when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
      */
@@ -634,6 +650,8 @@ public final class HmacUtils {
      *            The InputStream must not be null and will not be closed
      *            </p>
      * @return HmacSHA512 MAC for the given key and value
+     * @throws IOException
+     *             If an I/O error occurs.
      * @throws IllegalArgumentException
      *             when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
      */
@@ -682,6 +700,8 @@ public final class HmacUtils {
      *            The InputStream must not be null and will not be closed
      *            </p>
      * @return HmacSHA512 MAC for the given key and value as hex string (lowercase)
+     * @throws IOException
+     *             If an I/O error occurs.
      * @throws IllegalArgumentException
      *             when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.
      */
@@ -735,8 +755,10 @@ public final class HmacUtils {
      *            The InputStream must not be null and will not be closed
      *            </p>
      * @return the updated {@link Mac}
+     * @throws IOException
+     *             If an I/O error occurs.
      * @throws IllegalStateException
-     *             if the Mac was not initialized
+     *             If the Mac was not initialized
      * @since 1.x
      */
     public static Mac updateHmac(final Mac mac, final InputStream valueToDigest) throws IOException {