python des

Solutions on MaxInterview for python des by the best coders in the world

showing results for - "python des"
Carl
15 Aug 2019
1from Crypto.Cipher import DES
2from Crypto import Random
3iv = Random.get_random_bytes(8)
4des1 = DES.new('01234567', DES.MODE_CFB, iv)
5des2 = DES.new('01234567', DES.MODE_CFB, iv)
6text = 'Good Morning'
7cipher_text = des1.encrypt(text)
8print("Encrpted message ",cipher_text) 
9print("Decrypted Original Message: ",(des2.decrypt(cipher_text)))