MD5 is 128 bits but why is it 32 characters?

hash_jr90 picture hash_jr90 · Jun 11, 2011 · Viewed 111.3k times · Source

I read some docs about md5, it said that its 128 bits, but why is it 32 characters? I can't compute the characters.

  • 1 byte is 8 bits
  • if 1 character is 1 byte
  • then 128 bits is 128/8 = 16 bytes right?

EDIT:

SHA-1 produces 160 bits, so how many characters are there?

Answer

ba__friend picture ba__friend · Jun 11, 2011

32 chars as hexdecimal representation, thats 2 chars per byte.