This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git

commit be2cf88e5b43928b571acfa318da7741b1d29bae
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Dec 31 09:33:55 2025 -0500

    Internal refactoring
---
 src/main/java/org/apache/commons/codec/digest/HmacUtils.java | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/main/java/org/apache/commons/codec/digest/HmacUtils.java 
b/src/main/java/org/apache/commons/codec/digest/HmacUtils.java
index 2fab314a..84243169 100644
--- a/src/main/java/org/apache/commons/codec/digest/HmacUtils.java
+++ b/src/main/java/org/apache/commons/codec/digest/HmacUtils.java
@@ -657,17 +657,12 @@ public final class HmacUtils {
     /**
      * Tests whether this algorithm is available
      *
-     * @param name the name to check.
+     * @param hmacAlgorithms the HmacAlgorithms to check.
      * @return whether this algorithm is available.
      * @since 1.11
      */
-    public static boolean isAvailable(final HmacAlgorithms name) {
-        try {
-            Mac.getInstance(name.getName());
-            return true;
-        } catch (final NoSuchAlgorithmException e) {
-            return false;
-        }
+    public static boolean isAvailable(final HmacAlgorithms hmacAlgorithms) {
+        return isAvailable(hmacAlgorithms.getName());
     }
 
     /**

Reply via email to