-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsync.py
32 lines (24 loc) · 1010 Bytes
/
sync.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
from time import time
from syncrypto import Crypto, Syncrypto
bufferSize = 64 * 1024
password = "some_dummy_password"
folder = "/Users/bvalean/TVB/PROJECTS/Default_Project"
folder_encrypted = "/Users/bvalean/WORK/test-encryption/Default_Project_encrypted"
folder_decrypted = "/Users/bvalean/WORK/test-encryption/Default_Project_decrypted"
if __name__ == '__main__':
print("========== ENCRYPTION ==========")
crypto = Crypto(password)
syncro1 = Syncrypto(crypto,folder_encrypted,folder)
t = time()
syncro1.sync_folder()
print("========== FINISH ENCRYPTION ==========")
encryption = time()-t
print("========== DECRYPTION ==========")
syncro1 = Syncrypto(crypto,folder_encrypted,folder_decrypted)
t = time()
syncro1.sync_folder()
print("========== FINISH DECRYPTION ==========")
decryption = time() - t
print("========== RESULTS ==========")
print("Ecrypted: {} seconds".format(encryption))
print("Decrypted: {} seconds".format(decryption))