I got a code for MD5 hash generation in Java. It generates the hash in byte array "bytes" and then converts to integer and then to string as follows:
byte[] bytes=md.digest(textToHash.getBytes());
StringBuilder sb=new StringBuilder();
for(int i=0;i<bytes.length;i++)
sb.append(Integer.toString((bytes[i] & 0xff) + 0x100, 16).substring(1));
I understood that bytes[i] & 0xff
converts byte to integer of 32 bit length copying the byte to the least significant byte of the integer:
What does value & 0xff do in Java?
However I couldn't understand what + 0x100, 16
does in the parentheses at line 4 of the above code. Your help is appreciated.