Here you can find the source of convertHexString(String ss)
public static byte[] convertHexString(String ss)
//package com.java2s; //License from project: Apache License public class Main { public static byte[] convertHexString(String ss) { byte digest[] = new byte[ss.length() / 2]; for (int i = 0; i < digest.length; i++) { String byteString = ss.substring(2 * i, 2 * i + 2); int byteValue = Integer.parseInt(byteString, 16); digest[i] = (byte) byteValue; }//from w w w.ja va2s.c o m return digest; } }