Skip to main content

Hash encoding

·1 min
  • MD5 hashes and UUIDs are 128 bits. So, if you encode them using hexadecimals, each hex character will encode 4 bits of information, so resultant “string” will be 128/4=32 character/bytes long.
    • If you store UUIDs as string, you need 4 additional characters for the hyphens.
  • If you store them in binary format, you just need 128/8 = 16 bytes because each byte will encode 8 bits of information.