fork download
  1. from Crypto.Cipher import DES
  2. des = DES.new('98765432', 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 9252KB
stdin
Standard input is empty
stdout
b'u\xfd\xba\xd6\xce\xaa\xe7\xd2'