<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import , division , print_function <EOL> import math <EOL> import mock <EOL> try : <EOL> import unittest2 as unittest <EOL> except ImportError : <EOL> import unittest <EOL> from tls import cipherlib <EOL> from tls . c import api <EOL> if hasattr ( str , '<STR_LIT>' ) : <EOL> int2byte = chr <EOL> else : <EOL> int2byte = lambda i : bytes ( ( i , ) ) <EOL> class TestAlgorithms ( unittest . TestCase ) : <EOL> def test_guaranteed ( self ) : <EOL> self . assertEqual ( set ( ) , cipherlib . algorithms_guaranteed ) <EOL> def test_available ( self ) : <EOL> self . assertGreater ( len ( cipherlib . algorithms_available ) , <NUM_LIT:0> ) <EOL> self . assertIn ( b'<STR_LIT>' , cipherlib . algorithms_available ) <EOL> class CipherObject ( object ) : <EOL> def setUp ( self ) : <EOL> self . cipher = cipherlib . Cipher ( self . ENCRYPT , self . ALGORITHM , self . DIGEST ) <EOL> def tearDown ( self ) : <EOL> if hasattr ( self , '<STR_LIT>' ) : <EOL> del self . cipher <EOL> def test_algorithm ( self ) : <EOL> self . assertEqual ( self . ALGORITHM , self . cipher . algorithm ) <EOL> def test_digest ( self ) : <EOL> self . assertEqual ( self . DIGEST , self . cipher . digest ) <EOL> def test_digest_size ( self ) : <EOL> self . assertEqual ( self . DIGEST_SIZE , self . cipher . digest_size ) <EOL> def test_block_size ( self ) : <EOL> self . assertEqual ( self . LEN_BLOCK , self . cipher . block_size ) <EOL> def test_ivector_len ( self ) : <EOL> self . assertEqual ( self . LEN_IV , self . cipher . ivector_len ) <EOL> def test_key_len ( self ) : <EOL> self . assertEqual ( self . LEN_KEY , self . cipher . key_len ) <EOL> def test_decrypting ( self ) : <EOL> self . assertNotEqual ( self . ENCRYPT , self . cipher . decrypting ) <EOL> def test_encrypting ( self ) : <EOL> self . assertEqual ( self . ENCRYPT , self . cipher . encrypting ) <EOL> def test_mode ( self ) : <EOL> self . assertEqual ( self . MODE , self . cipher . mode ) <EOL> def test_name ( self ) : <EOL> self . assertEqual ( self . ALGORITHM , self . cipher . name ) <EOL> def test_invalid_name ( self ) : <EOL> self . assertRaises ( ValueError , cipherlib . Cipher , self . ENCRYPT , b'<STR_LIT>' ) <EOL> def test_initialised ( self ) : <EOL> self . cipher . initialise ( self . KEY , self . IVECTOR ) <EOL> self . assertTrue ( self . cipher . is_initialised ) <EOL> def test_initialise_invalid_key ( self ) : <EOL> self . assertRaises ( ValueError , self . cipher . initialise , <EOL> self . KEY + b'<STR_LIT>' , self . IVECTOR ) <EOL> def test_initialise_invalid_ivector ( self ) : <EOL> self . assertRaises ( ValueError , self . cipher . initialise , <EOL> self . KEY , self . IVECTOR + b'<STR_LIT>' ) <EOL> def test_update ( self ) : <EOL> self . cipher . initialise ( self . KEY , self . IVECTOR ) <EOL> self . cipher . update ( b'<STR_LIT:\x00>' * self . LEN_BLOCK ) <EOL> def test_update_invalid ( self ) : <EOL> self . assertRaises ( ValueError , self . cipher . update , b'<STR_LIT:\x00>' * self . LEN_BLOCK ) <EOL> def test_finish ( self ) : <EOL> self . cipher . initialise ( self . KEY , self . IVECTOR ) <EOL> self . cipher . finish ( ) <EOL> def test_ciphertext ( self ) : <EOL> if not self . ENCRYPT : <EOL> return <EOL> self . cipher . initialise ( self . KEY , self . IVECTOR ) <EOL> self . cipher . update ( b'<STR_LIT:\x00>' * self . LEN_BLOCK ) <EOL> self . cipher . finish ( ) <EOL> ciphertext = self . cipher . ciphertext ( ) <EOL> length = math . ceil ( float ( self . LEN_BLOCK + self . cipher . digest_size + <NUM_LIT:1> ) <EOL> / self . LEN_BLOCK ) * self . LEN_BLOCK <EOL> self . assertEqual ( len ( ciphertext ) , length ) <EOL> def test_ciphertext_invalid ( self ) : <EOL> if self . ENCRYPT : <EOL> return <EOL> self . cipher . initialise ( self . KEY , self . IVECTOR ) <EOL> self . cipher . update ( b'<STR_LIT:\x00>' * self . LEN_BLOCK ) <EOL> self . cipher . finish ( ) <EOL> self . assertRaises ( ValueError , self . cipher . ciphertext ) <EOL> def test_plaintext_invalid ( self ) : <EOL> if not self . ENCRYPT : <EOL> return <EOL> self . cipher . initialise ( self . KEY , self . IVECTOR ) <EOL> self . cipher . update ( b'<STR_LIT:\x00>' * self . LEN_BLOCK ) <EOL> self . cipher . finish ( ) <EOL> self . assertRaises ( ValueError , self . cipher . plaintext ) <EOL> def test_weakref_bio ( self ) : <EOL> BIO_free_all_cleanup = api . BIO_free_all <EOL> with mock . patch ( '<STR_LIT>' ) as cleanup_mock : <EOL> cleanup_mock . side_effect = BIO_free_all_cleanup <EOL> del self . cipher <EOL> self . assertEqual ( cleanup_mock . call_count , <NUM_LIT:1> ) <EOL> class TestAesEncryptObject ( CipherObject , unittest . TestCase ) : <EOL> ALGORITHM = b'<STR_LIT>' <EOL> DIGEST = b'<STR_LIT>' <EOL> DIGEST_SIZE = <NUM_LIT:20> <EOL> ENCRYPT = True <EOL> IVECTOR = b'<STR_LIT:\x00>' * <NUM_LIT:16> <EOL> KEY = b'<STR_LIT:\x00>' * <NUM_LIT:16> <EOL> LEN_BLOCK = <NUM_LIT:16> <EOL> LEN_IV = <NUM_LIT:16> <EOL> LEN_KEY = <NUM_LIT:16> <EOL> MODE = cipherlib . EVP_CIPH_CBC_MODE <EOL> def test_key_len_set ( self ) : <EOL> def change_key_len ( length ) : <EOL> self . cipher . key_len = length <EOL> self . assertRaises ( ValueError , change_key_len , <NUM_LIT:8> ) <EOL> class TestRc4DecryptObject ( CipherObject , unittest . TestCase ) : <EOL> ALGORITHM = b'<STR_LIT>' <EOL> DIGEST = b'<STR_LIT>' <EOL> DIGEST_SIZE = <NUM_LIT:16> <EOL> ENCRYPT = False <EOL> IVECTOR = b'<STR_LIT>' <EOL> KEY = b'<STR_LIT:\x00>' * <NUM_LIT:16> <EOL> LEN_BLOCK = <NUM_LIT:1> <EOL> LEN_IV = <NUM_LIT:0> <EOL> LEN_KEY = <NUM_LIT:16> <EOL> MODE = cipherlib . EVP_CIPH_STREAM_CIPHER <EOL> def test_key_len_set ( self ) : <EOL> self . cipher_key_len = <NUM_LIT:8> <EOL> class TestDesEncryptObject ( CipherObject , unittest . TestCase ) : <EOL> ALGORITHM = b'<STR_LIT>' <EOL> DIGEST = None <EOL> DIGEST_SIZE = <NUM_LIT:0> <EOL> ENCRYPT = True <EOL> IVECTOR = b'<STR_LIT>' <EOL> KEY = b'<STR_LIT:\x00>' * <NUM_LIT:8> <EOL> LEN_BLOCK = <NUM_LIT:8> <EOL> LEN_IV = <NUM_LIT:0> <EOL> LEN_KEY = <NUM_LIT:8> <EOL> MODE = cipherlib . EVP_CIPH_ECB_MODE <EOL> def test_key_len_set ( self ) : <EOL> def change_key_len ( length ) : <EOL> self . cipher . key_len = length <EOL> self . assertRaises ( ValueError , change_key_len , <NUM_LIT:16> ) <EOL> class CipherTests ( object ) : <EOL> @ staticmethod <EOL> def hexstr_to_bytestr ( hexstr ) : <EOL> chars = [ ] <EOL> for pos in range ( <NUM_LIT:0> , len ( hexstr ) , <NUM_LIT:2> ) : <EOL> chars . append ( int ( hexstr [ pos : pos + <NUM_LIT:2> ] , <NUM_LIT:16> ) ) <EOL> return b"<STR_LIT>" . join ( int2byte ( c ) for c in chars ) <EOL> @ classmethod <EOL> def setUpClass ( self ) : <EOL> self . key = self . hexstr_to_bytestr ( self . key ) <EOL> if self . iv is not None : <EOL> self . iv = self . hexstr_to_bytestr ( self . iv ) <EOL> self . plaintext = self . hexstr_to_bytestr ( self . plaintext ) <EOL> self . ciphertext = self . hexstr_to_bytestr ( self . ciphertext ) <EOL> def _encrypt ( self ) : <EOL> cipher = cipherlib . Cipher ( True , self . algorithm ) <EOL> cipher . initialise ( self . key , self . iv ) <EOL> cipher . update ( self . plaintext ) <EOL> cipher . finish ( ) <EOL> return cipher . ciphertext ( ) <EOL> def _decrypt ( self , data ) : <EOL> cipher = cipherlib . Cipher ( False , self . algorithm ) <EOL> cipher . initialise ( self . key , self . iv ) <EOL> cipher . update ( data ) <EOL> cipher . finish ( ) <EOL> return cipher . plaintext ( ) <EOL> def test_encrypt_decrypt ( self ) : <EOL> result = self . _encrypt ( ) <EOL> self . assertEqual ( result [ : len ( self . ciphertext ) ] , self . ciphertext ) <EOL> result = self . _decrypt ( result ) <EOL> self . assertEqual ( result [ : len ( self . plaintext ) ] , self . plaintext ) <EOL> def test_bitflip_data_decrypt ( self ) : <EOL> result = self . _encrypt ( ) <EOL> result = int2byte ( ord ( result [ : <NUM_LIT:1> ] ) ^ <NUM_LIT> ) + result [ <NUM_LIT:1> : ] <EOL> self . assertRaises ( ValueError , self . _decrypt , result ) <EOL> def test_bitflip_hmac_decrypt ( self ) : <EOL> result = self . _encrypt ( ) <EOL> pos = len ( self . ciphertext ) <EOL> result = ( result [ : pos ] <EOL> + int2byte ( ord ( result [ pos : pos + <NUM_LIT:1> ] ) ^ <NUM_LIT> ) <EOL> + result [ pos + <NUM_LIT:1> : ] ) <EOL> self . assertRaises ( ValueError , self . _decrypt , result ) <EOL> def test_bitflip_padding_decrypt ( self ) : <EOL> result = self . _encrypt ( ) <EOL> result = result [ : - <NUM_LIT:1> ] + int2byte ( ord ( result [ - <NUM_LIT:1> : ] ) ^ <NUM_LIT> ) <EOL> self . assertRaises ( ValueError , self . _decrypt , result ) <EOL> def test_trunc_data_decrypt ( self ) : <EOL> result = self . _encrypt ( ) <EOL> result = result [ <NUM_LIT:1> : ] <EOL> self . assertRaises ( ValueError , self . _decrypt , result ) <EOL> def test_trunc_hmac_decrypt ( self ) : <EOL> result = self . _encrypt ( ) <EOL> pos = len ( self . ciphertext ) <EOL> result = result [ : pos ] + result [ pos + <NUM_LIT:1> : ] <EOL> self . assertRaises ( ValueError , self . _decrypt , result ) <EOL> def test_trunc_padding_decrypt ( self ) : <EOL> result = self . _encrypt ( ) <EOL> result = result [ : - <NUM_LIT:1> ] <EOL> self . assertRaises ( ValueError , self . _decrypt , result ) <EOL> class Test_AES_ECB_128_v1 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = None <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_ECB_128_v2 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = None <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_ECB_128_v3 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = None <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_ECB_128_v4 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = None <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_ECB_192_v1 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = None <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_ECB_192_v2 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = None <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_ECB_192_v3 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = None <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_ECB_192_v4 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = None <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_ECB_256_v1 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = None <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_ECB_256_v2 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = None <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_ECB_256_v3 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = None <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_ECB_256_v4 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = None <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CBC_128_v1 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CBC_128_v2 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CBC_128_v3 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CBC_128_v4 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CBC_192_v1 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CBC_192_v2 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CBC_192_v3 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CBC_192_v4 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CBC_256_v1 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CBC_256_v2 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CBC_256_v3 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CBC_256_v4 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CFB_128_v1 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CFB_128_v2 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CFB_128_v3 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CFB_128_v4 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CFB_192_v1 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CFB_192_v2 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CFB_192_v3 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CFB_192_v4 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CFB_256_v1 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CFB_256_v2 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CFB_256_v3 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_CFB_256_v4 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_OFB_128_v1 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_OFB_128_v2 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_OFB_128_v3 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_OFB_128_v4 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_OFB_192_v1 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_OFB_192_v2 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_OFB_192_v3 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_OFB_192_v4 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_OFB_256_v1 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_OFB_256_v2 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_OFB_256_v3 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" <EOL> class Test_AES_OFB_256_v4 ( CipherTests , unittest . TestCase ) : <EOL> algorithm = b"<STR_LIT>" <EOL> key = b"<STR_LIT>" <EOL> iv = b"<STR_LIT>" <EOL> plaintext = b"<STR_LIT>" <EOL> ciphertext = b"<STR_LIT>" </s>
