I wrote a program that generated a 20 byte SHA-1 hash value.
The values are in a byte array and I am trying to print them
out as hexadecimal
string.
I am having problems printing out negative values.
e.g. byte b = (byte)0xff;
System.out.println( Integer.toHexString(b) );
produces fffffffd ?? Shouldn't I get back ff ?
Thanks
Pho