diff options
author | Michael Manganiello <adamantike@users.noreply.github.com> | 2016-04-23 05:46:16 -0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2016-04-23 10:46:16 +0200 |
commit | cf124d3fbf4aaa98da36d65ec92daf0d7bc8c094 (patch) | |
tree | f41fd8b38159c4d78d9fd35c9235ab7834a6cdc6 /tests | |
parent | fb062b303a84f716e6180a365f7f507c662152f7 (diff) | |
download | rsa-git-cf124d3fbf4aaa98da36d65ec92daf0d7bc8c094.tar.gz |
Fix edge case for byte() call at pkcs1 test (#64)
Nice catch :)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_pkcs1.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_pkcs1.py b/tests/test_pkcs1.py index 39555f6..5702aae 100644 --- a/tests/test_pkcs1.py +++ b/tests/test_pkcs1.py @@ -48,7 +48,8 @@ class BinaryTest(unittest.TestCase): a = encrypted[5] if is_bytes(a): a = ord(a) - encrypted = encrypted[:5] + byte(a + 1) + encrypted[6:] + altered_a = (a + 1) % 256 + encrypted = encrypted[:5] + byte(altered_a) + encrypted[6:] self.assertRaises(pkcs1.DecryptionError, pkcs1.decrypt, encrypted, self.priv) |