Example #1
0
 def decrypt_button(self, passwd, filename):
     response = False
     if (filename == ""):
         messagebox.showerror("Error", "Please select a file!")
     elif(passwd == ""):
         messagebox.showerror("Error", "Please enter a password!")
     else:
         response = messagebox.askyesno("Decrypt", "Are you sure?")
     if(response):
         self.key = passwd.encode('UTF-8')
         dec = Decryptor(self.key)
         dec.decrypt_file(filename)
         messagebox.showinfo("Succes", "Decryption successful")
     pass
Example #2
0
 def decrypt_button(self, passwd):
     response = messagebox.askyesno("Decrypt", "Are you sure?")
     key = passwd.encode('UTF-8')
     dec = Decryptor(key)
     dec.decrypt_file(self.filename)
     pass