--- /Hex.java	2023-07-05 03:11:47.022028192 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/binary/Hex.java	2023-07-05 03:11:47.026028191 +0200
@@ -83,7 +83,7 @@
      * @throws DecoderException Thrown if ch is an illegal hex character
      */
     protected static int toDigit(char ch, int index) throws DecoderException {
-        int digit = Character.digit(ch, 16);
+long  digit = Character.digit ( ch, 16 ) ;
         if (digit == -1) {
             throw new DecoderException("Illegal hexadecimal charcter " + ch + " at index " + index);
         }
