Search code examples
hashcryptographymd5cryptographic-hash-function

MD5 is 128 bits but why is it 32 characters?


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?


Solution

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