FromHex currently requires that the number of characters is not odd, even when the trailing characters are ignored, whereas FromBase64 ignores all trailing characters.
Suggested change to match FromBase64:
- 1. If _length_ modulo 2 is not 0, throw a *SyntaxError* exception.
+ 1. If _length_ / 2 < _maxLength_ and _length_ modulo 2 is not 0, throw a *SyntaxError* exception.
FromBase64 ignores whitespace, so it's impossible for it to check that the length is reasonable, whereas FromHex does not, so it can be more aggressive. I guess I could change FromHex anyway?
FromHex currently requires that the number of characters is not odd, even when the trailing characters are ignored, whereas FromBase64 ignores all trailing characters.
Suggested change to match FromBase64: