String StrtoHEX (String STR)
{
String strTemp = "";
IF (str = "")
""; "
Byte [] btemp = system.text.Encoding.default.getbytes (STR);
For (int i = 0; i
{
Strtemp = Btemp [i] .tostring ("x");
}
Return strtemp;
}
The following is taken from 9CBS, Byte [] turn String soon, no test
Char [] hexdigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'c', 'd', 'e', 'f'};
String tohexstring (byte [] Bytes)
{
Char [] chars = new char [bytes.length * 2];
For (int i = 0; i
{
INT b = bytes [i];
Chars [i * 2] = HEXDIGITS [B >> 4];
Chars [i * 2 1] = HEXDIGITS [B & 0xF];
}
Return New String (Chars);
}