-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix handling of negative bytes in input
Negative bytes were converted to UIntas is, without consideration for their sign (UInt is higher precision and can fit both). Converting to UByte first ensures sign is handled (i.e., masked with 0xff). This commit also increases test coverage of edge cases, by testing with all bytes in random order, similar to Apache's Commons Codec test suite. Closes #3
- Loading branch information
1 parent
7eba7f4
commit 6ceffd1
Showing
3 changed files
with
217 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters