fork download
  1. from Crypto.Cipher import DES3
  2. from Crypto import Random
  3.  
  4. key = b'Sixteen byte key'
  5. iv = Random.new().read(DES3.block_size)
  6. cipher = DES3.new(key, DES3.MODE_OFB, iv)
  7. plaintext = b'Hi Hannah Encryp'
  8. msg = iv + cipher.encrypt(plaintext)
Success #stdin #stdout 0.02s 11256KB
stdin
Standard input is empty
stdout
Standard output is empty