fork download
  1. from Crypto.Cipher import DES
  2. des = DES.new('asdfghjk', DES.MODE_ECB)
  3. text = 'abcdefgh'
  4. cipher_text = des.encrypt(text)
  5. print (cipher_text)
  6. des.decrypt(cipher_text)
  7.  
Success #stdin #stdout 0.02s 9372KB
stdin
Standard input is empty
stdout
b'\xa8^\\\x88~h6e'