from Crypto.Cipher import DES key = b'secretke' # 56-bit key message = b'This is a secret message' cipher = DES.new(key, DES.MODE_ECB) encrypted_message = cipher.encrypt(message) print(encrypted_message) decrypted_message = cipher.decrypt(encrypted_message) print(decrypted_message)This example uses the ECB mode of operation, which is not recommended for use in production environments. The recommended mode of operation is CBC, which mode is also available in the library. The package library used in this example is the Python Crypto library.