Beispiel #1
0
 def test_aes(self):
     c = AES.new(aes_pad_key('pass'), AES.MODE_CBC, self.iv_aes)
     self.assertEqual(c.encrypt(pad('sensitive information', c.block_size)), self.encrypt_aes)
Beispiel #2
0
 def test_encrypt(self):
     c = Blowfish.new('pass', Blowfish.MODE_CBC, self.iv_blowfish)
     self.assertEqual(c.encrypt(pad('sensitive information', c.block_size)), self.encrypt_bf)