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?

2
  • How would you store a byte array? Commented Sep 22, 2015 at 16:50
  • To examine its contents programatically, for example. Commented Sep 22, 2015 at 16:52

1 Answer 1

3

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...
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.