-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
41 lines (32 loc) · 1.21 KB
/
main.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
"""
Acts as the starting point for the program
The main objective of the program is to use a neural network based encryption algorithm.
"""
import server
import client
if __name__ == '__main__':
print('Starting Decrypto Networko')
ser = server.Server(3, 7)
cli = client.Client(3, 7)
data = 'Hi there my name is Arko and I am here to study computer science and engineering'
print('------------------------Phase 1 -------------------------')
print('Encrypting!')
encrypted_data = ser.encrypt(data)
print(encrypted_data)
print('Decrypting')
decrypted_data = cli.decrypt(encrypted_data)
print(decrypted_data)
print('------------------------Phase 2 -------------------------')
data = 'Testing'
print('Encrypting!')
encrypted_data = ser.encrypt(data)
print('Decrypting')
decrypted_data = cli.decrypt(encrypted_data)
print(decrypted_data)
print('------------------------Phase 3 -------------------------')
data = 'This is another set of data that needs to be encrypted and sent to the client'
print('Encrypting!')
encrypted_data = ser.encrypt(data)
print('Decrypting')
decrypted_data = cli.decrypt(encrypted_data)
print(decrypted_data)