1

I have encountered a number of implementations of algorithms for converting a byte array to a hexadecimal string in many languages:

Why is this conversion used so often?
What are the advantages of storing byte arrays as hexadecimal strings?

Community
  • 1
  • 1
MiamiBeach
  • 3,261
  • 6
  • 28
  • 54

1 Answers1

2

For example:

  • To store in a file with a format that doesn't support binary, e.g. CSV.
  • To store in a database field that doesn't support binary.
  • To send in a protocol that doesn't support binary.
  • To embed in other content that doesn't support binary, e.g. XML and JSON.
  • To display to a user.
  • Many other reasons...
Andreas
  • 154,647
  • 11
  • 152
  • 247