diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-19 16:53:36 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-19 16:53:36 -0800 |
commit | 26ebea2c5bde18aaecee5f03291606cc5799d0cc (patch) | |
tree | 12af7109e720310947d1857bcffc7fced0a39949 | |
parent | 707253283ec2921bf76e2c8049eb47388d9da580 (diff) | |
download | cryptography-26ebea2c5bde18aaecee5f03291606cc5799d0cc.tar.gz cryptography-26ebea2c5bde18aaecee5f03291606cc5799d0cc.tar.bz2 cryptography-26ebea2c5bde18aaecee5f03291606cc5799d0cc.zip |
Tests for OFB and CFB
-rw-r--r-- | tests/hazmat/primitives/test_block.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/hazmat/primitives/test_block.py b/tests/hazmat/primitives/test_block.py index b41f8922..ad56f77e 100644 --- a/tests/hazmat/primitives/test_block.py +++ b/tests/hazmat/primitives/test_block.py @@ -123,3 +123,19 @@ class TestModeValidation(object): modes.CBC(b"abc"), backend, ) + + def test_ofb(self, backend): + with pytest.raises(ValueError): + Cipher( + algorithms.AES(b"\x00" * 16), + modes.OFB(b"abc"), + backend, + ) + + def test_cfb(self, backend): + with pytest.raises(ValueError): + Cipher( + algorithms.AES(b"\x00" * 16), + modes.CFB(b"abc"), + backend, + ) |