2

I am performing some encryption using this

String encodedString = Hex.encodeHexString(s.getBytes("ISO-8859-1"));

. I have used commons-codec-1.8.jar in android.

Its displaying error

06-21 12:43:04.309: E/AndroidRuntime(1667): Caused by: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Hex.encodeHexString 

Please help.

Amit Koranne
  • 141
  • 2
  • 11
  • Same question here: http://stackoverflow.com/questions/9126567/method-not-found-using-digestutils-in-android – maqjav Jun 21 '13 at 07:33

1 Answers1

2

try

String encodedString = new String(Hex.encodeHex(s.getBytes("ISO-8859-1")));
sschrass
  • 7,014
  • 6
  • 43
  • 62