Closed mendelmunkis closed 5 years ago
I'm sorry I somehow missed those while looking through the issues.
Also as I would like to keep hex code relatively simple and not handle every corner cases (which are generally easy to detect and fix).
I understand that. Still the current API is very restrictive: no spaces, no "0x" at start and fixed input width (exactly input.len() == output.len() * 2). A (new) function to parse a "dirty" input looks appropriate here.
A user of this crate would be happy to clean up his code and avoid reinventing a wheel using such a (new) fn.
there is more of use that would say spaces are useful in hex encoded strings. Implementation could check for ASCII byte 32. hex-literal supports whitespace characters so I was affected with this when copying example which worked with hex-literal::hex
to hex::decode
which returned error
As discussed on #4 and #6, i don't think it'd be implemented Also as I would like to keep
hex
code relatively simple and not handle every corner cases (which are generally easy to detect and fix).