コード例 #1
0
 def testEncodingDecoding(self):
     self.myRSA = Cryptography.RSA()
     self.assertEqual(self.myRSA.decryption(self.myRSA.encryption(651651)),
                      651651, "RSA doesnt work")
コード例 #2
0
 def testCoprime(self):
     self.myRSA = Cryptography.RSA()
     self.assertEqual(self.myRSA.e * self.myRSA.d % self.myRSA.fiFunction(),
                      1, "not coprime!")