Beispiel #1
0
 def test_encrypt_decrypt(self):
     string = "Hello World!"
     RSA.generate_rsa()
     s_encrypt = RSA.encrypt(".id_rsa.pub", string)
     s_decrypt = RSA.decrypt(".id_rsa", s_encrypt)
     assert s_decrypt == string
Beispiel #2
0
 def test_generate_rsa(self):
     RSA.generate_rsa()
     if not os.path.exists(".id_rsa") and os.path.exists(".id_rsa.pub"):
         assert False, "Generation failed"