online-tools icon indicating copy to clipboard operation
online-tools copied to clipboard

Fix allow hex input formatting

Open makinako opened this issue 1 year ago • 0 comments

Thanks for this simple and excellent tool! I often use it for manually checking cryptographic test vectors in algorithm development and often when dealing with complicated hex input structure, I break it up to make it more human readable. This PR just allows any kind of whitespace and the most common hex delimeters to be used in the input without an error or modification to the output calculation.

The following formatted inputs (and any combination of formatting characters) will all produce the same output:

  • 112233
  • 11 22 33 (Space)
  • 11 22 33 (Tabs)
  • 11.22.33 (Period)
  • 11:22:33 (Colon)
  • 11\22\33 (Backslash)
  • 11/22/33 (Forwardslash)
  • 11-22-33 (Hyphen)
  • 11_22_33 (Underscore)

and CR, LF or CRLF:

11
22
33

Thanks again, Kim

makinako avatar Nov 27 '24 01:11 makinako