-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.py
44 lines (34 loc) · 1.09 KB
/
index.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from aes128 import AES as AES_128
from aes192 import AES as AES_192
from aes256 import AES as AES_256
from aes512 import AES as AES_512
msg = 'Checking AES Encryption & Decryption on python'
encode = '__all__'
print('AES 128')
key = 'Thats my Kung Fu' # 16 character / 128 bits
encrypt_128 = AES_128()
x = encrypt_128.encrypt(key, msg, encode)
y = encrypt_128.decrypt(key, x['hex'])
print(x)
print(y, end='\n\n')
print('AES 192')
key = 'Thats my Kung Fu Panda !' # 24 character / 192 bits
encrypt_192 = AES_192()
x = encrypt_192.encrypt(key, msg, encode)
y = encrypt_192.decrypt(key, x['hex'])
print(x)
print(y, end='\n\n')
print('AES 256')
key = 'Thats my Kung Fu Panda ! Style12' # 32 character / 256 bits
encrypt_256 = AES_256()
x = encrypt_256.encrypt(key, msg, encode)
y = encrypt_256.decrypt(key, x['hex'])
print(x)
print(y, end='\n\n')
print('AES 512')
key = 'Thats my Kung Fu Panda ! Style12Thats my Kung Fu Panda ! Style12' # 64 character / 512 bits
encrypt_512 = AES_512()
x = encrypt_512.encrypt(key, msg, encode)
y = encrypt_512.decrypt(key, x['hex'])
print(x)
print(y, end='\n\n')