Skip to content

Commit a886e43

Browse files
authored
Added app1 & app2 implementation
1 parent b96fb01 commit a886e43

2 files changed

Lines changed: 92 additions & 0 deletions

File tree

‎cryptography/app1/app.py‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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()

‎cryptography/app2/app.py‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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()

0 commit comments

Comments
 (0)