<s> from Crypto . Cipher import ARC2 <EOL> from Crypto . Cipher import ARC4 <EOL> from Crypto . Cipher import Blowfish <EOL> from Crypto . Cipher import DES <EOL> from Crypto . Cipher import XOR <EOL> from Crypto . Hash import SHA <EOL> from Crypto import Random <EOL> from Crypto . Util import Counter <EOL> from cryptography . hazmat . primitives . ciphers import Cipher <EOL> from cryptography . hazmat . primitives . ciphers import algorithms <EOL> from cryptography . hazmat . primitives . ciphers import modes <EOL> from cryptography . hazmat . backends import default_backend <EOL> from struct import pack <EOL> key = b'<STR_LIT>' <EOL> iv = Random . new ( ) . read ( ARC2 . block_size ) <EOL> cipher = ARC2 . new ( key , ARC2 . MODE_CFB , iv ) <EOL> msg = iv + cipher . encrypt ( b'<STR_LIT>' ) <EOL> key = b'<STR_LIT>' <EOL> nonce = Random . new ( ) . read ( <NUM_LIT:16> ) <EOL> tempkey = SHA . new ( key + nonce ) . digest ( ) <EOL> cipher = ARC4 . new ( tempkey ) <EOL> msg = nonce + cipher . encrypt ( b'<STR_LIT>' ) <EOL> bs = Blowfish . block_size <EOL> key = b'<STR_LIT>' <EOL> iv = Random . new ( ) . read ( bs ) <EOL> cipher = Blowfish . new ( key , Blowfish . MODE_CBC , iv ) <EOL> plaintext = b'<STR_LIT>' <EOL> plen = bs - divmod ( len ( plaintext ) , bs ) [ <NUM_LIT:1> ] <EOL> padding = [ plen ] * plen <EOL> padding = pack ( '<STR_LIT:b>' * plen , * padding ) <EOL> msg = iv + cipher . encrypt ( plaintext + padding ) <EOL> key = b'<STR_LIT>' <EOL> nonce = Random . new ( ) . read ( DES . block_size / <NUM_LIT:2> ) <EOL> ctr = Counter . new ( DES . block_size * <NUM_LIT:8> / <NUM_LIT:2> , prefix = nonce ) <EOL> cipher = DES . new ( key , DES . MODE_CTR , counter = ctr ) <EOL> plaintext = b'<STR_LIT>' <EOL> msg = nonce + cipher . encrypt ( plaintext ) <EOL> key = b'<STR_LIT>' <EOL> cipher = XOR . new ( key ) <EOL> plaintext = b'<STR_LIT>' <EOL> msg = cipher . encrypt ( plaintext ) <EOL> cipher = Cipher ( algorithms . ARC4 ( key ) , mode = None , backend = default_backend ( ) ) <EOL> encryptor = cipher . encryptor ( ) <EOL> ct = encryptor . update ( b"<STR_LIT>" ) <EOL> cipher = Cipher ( algorithms . Blowfish ( key ) , mode = None , backend = default_backend ( ) ) <EOL> encryptor = cipher . encryptor ( ) <EOL> ct = encryptor . update ( b"<STR_LIT>" ) <EOL> cipher = Cipher ( algorithms . IDEA ( key ) , mode = None , backend = default_backend ( ) ) <EOL> encryptor = cipher . encryptor ( ) <EOL> ct = encryptor . update ( b"<STR_LIT>" ) </s>
