Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CODEC-280] Added strict decoding property to BaseNCodec. (#35)
* [CODEC-280] Added strict decoding property to BaseNCodec. The default is lenient encoding. Any trailing bits that cannot be interpreted as part of the encoding are discarded. Combinations of trailing characters that cannot be created by a valid encoding are partially interpreted. If set to strict encoding the codec will raise an exception when trailing bits are present that are not part of a valid encoding. Added tests to show that in lenient mode re-encoding will create a different byte array. In strict mode the re-encoding should create the same byte array as the original (with appropriate pad characters on the input). * [CODEC-280] Added strict decoding property to BCodec. * [CODEC-280] Removed unused import @ignore from BCodecTest
- Loading branch information
1 parent
f5a61f0
commit 3c21223
Showing
8 changed files
with
220 additions
and
35 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
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
Oops, something went wrong.