Coverage for app.py: 0%

20 statements  

« prev     ^ index     » next       coverage.py v7.2.6, created at 2023-05-29 15:32 +0530

1import encryption_util 

2import key_util 

3import builtins 

4 

5if __name__=="__main__": 

6 println=builtins.print 

7 keypair1=key_util.generate_key_pair() 

8 keypair2=key_util.generate_key_pair() 

9 

10 shared_key1=key_util.generate_shared_key(keypair1.private_key,keypair2.public_key) 

11 shared_key2=key_util.generate_shared_key(keypair2.private_key,keypair1.public_key) 

12 println("shared_key1:",shared_key1) 

13 println("shared_key2:",shared_key2) 

14 println("shared_key1==shared_key2 ==>",shared_key1==shared_key2) 

15 

16 raw_data = "Hello This is ONDC Test Data" 

17 

18 println("-----------------------------------------------") 

19 encrypted_data=encryption_util.encrypt_data(shared_key1,raw_data) 

20 println("Encrypted Data ===> ", encrypted_data) 

21 println("-----------------------------------------------") 

22 

23 decrypted_data=encryption_util.decrypt_data(shared_key2,encrypted_data) 

24 println("decrypted Data ===> ",decrypted_data) 

25 println("-----------------------------------------------") 

26