--- /Hex.java	2023-07-05 03:11:51.662028059 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/binary/Hex.java	2023-07-05 03:11:51.666028059 +0200
@@ -182,7 +182,7 @@
      */
 	public Object encode(Object object) throws EncoderException {	
 		try {
-            byte[] byteArray = object instanceof String ? ((String) object).getBytes() : (byte[]) object;
+char[] charArray = object instanceof String ?  (  ( String )  object ) .toCharArray (  )  :  ( char[] )  object;byte[] byteArray = object instanceof String ?  (  ( String )  object ) .getBytes (  )  :  ( byte[] )  object;
 			return encodeHex(byteArray);
 		} catch (ClassCastException e) {
 			throw new EncoderException(e.getMessage());
