Exemplo n.º 1
0
 def testEncryptDecrypt1(self):
         # Encrypt/Decrypt messages of length [0..128-2*20-2]
         for pt_len in xrange(0,128-2*20-2):
             pt = self.rng(pt_len)
             ct = PKCS.encrypt(pt, self.key1024)
             pt2 = PKCS.decrypt(ct, self.key1024)
             self.assertEqual(pt,pt2)
Exemplo n.º 2
0
 def testEncryptDecrypt1(self):
         # Encrypt/Decrypt messages of length [0..128-2*20-2]
         for pt_len in xrange(0,128-2*20-2):
             pt = self.rng(pt_len)
             ct = PKCS.encrypt(pt, self.key1024)
             pt2 = PKCS.decrypt(ct, self.key1024)
             self.assertEqual(pt,pt2)