File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ from tkinter import *
2+ def stopProg (e ):
3+ root .destroy ()
4+
5+ root = Tk ()
6+ button1 = Button (root ,
7+ text = "Hello World click to close" )
8+ button1 .pack ()
9+ button1 .bind ('<Button-1>' ,stopProg )
10+ root .mainloop ()
11+
12+
13+
14+ from tkinter import *
15+ from Crypto .Cipher import AES
16+
17+ #Encrypt
18+ def Encrypt (e ):
19+ label1 .configure (text = "Decrypt" , fg = "green" )
20+ #root.destroy()
21+
22+ #Decrypt
23+ def Decrypt (e ):
24+ #obj = AES.new('This is a key123', AES.MODE_CBC, 'This is an IV456')
25+ label1 .configure (text = "Encrypt" , fg = "red" )
26+
27+ #Import tkinter library into the program
28+ root = Tk ()
29+
30+ encrypt = Button (root ,text = "Encrypt" )
31+ encrypt .pack (side = RIGHT )
32+ encrypt .bind ('<Button-1>' ,Encrypt )
33+
34+
35+ decrypt = Button (root ,text = "Decrypt" )
36+ decrypt .pack (side = LEFT )
37+ decrypt .bind ('<Button-1>' ,Decrypt )
38+
39+
40+ label1 = Label (root ,text = "Plain Text" , fg = "brown" )
41+ label1 .pack ()
42+
43+ E1 = Entry (root , bd = 5 )
44+ E1 .pack (side = RIGHT )
45+
46+ root .mainloop ()
Original file line number Diff line number Diff line change 1+ from tkinter import *
2+ def stopProg (e ):
3+ root .destroy ()
4+
5+ root = Tk ()
6+ button1 = Button (root ,
7+ text = "Hello World click to close" )
8+ button1 .pack ()
9+ button1 .bind ('<Button-1>' ,stopProg )
10+ root .mainloop ()
11+
12+
13+
14+ from tkinter import *
15+ from Crypto .Cipher import AES
16+
17+ #Encrypt
18+ def Encrypt (e ):
19+ label1 .configure (text = "Decrypt" , fg = "green" )
20+ #root.destroy()
21+
22+ #Decrypt
23+ def Decrypt (e ):
24+ #obj = AES.new('This is a key123', AES.MODE_CBC, 'This is an IV456')
25+ label1 .configure (text = "Encrypt" , fg = "red" )
26+
27+ #Import tkinter library into the program
28+ root = Tk ()
29+
30+ encrypt = Button (root ,text = "Encrypt" )
31+ encrypt .pack (side = RIGHT )
32+ encrypt .bind ('<Button-1>' ,Encrypt )
33+
34+
35+ decrypt = Button (root ,text = "Decrypt" )
36+ decrypt .pack (side = LEFT )
37+ decrypt .bind ('<Button-1>' ,Decrypt )
38+
39+
40+ label1 = Label (root ,text = "Plain Text" , fg = "brown" )
41+ label1 .pack ()
42+
43+ E1 = Entry (root , bd = 5 )
44+ E1 .pack (side = RIGHT )
45+
46+ root .mainloop ()
You can’t perform that action at this time.
0 commit comments