import java.math.*;
public String toHexString(byte[] in){
BigInteger temp = new BigInteger(in);
return temp.toString(16);
}
public byte[] fromHexString(String in){
BigInteger temp = new BigInteger(in, 16);
return temp.toByteArray();
}
星期三, 7月 09, 2008
Hex String to Byte Array and reverse
A very easy way to do these 2 things.
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言