Exemplo n.º 1
0
 def test_aes_pad(self):
     c = AES.new(aes_pad_key('secret'), AES.MODE_CBC, self.iv_aes)
     self.assertEqual(unpad(c.decrypt(self.encrypt_aes_padded), c.block_size), b'xxxxxxxxxxxxxxxx')
Exemplo n.º 2
0
 def test_decrypt(self):
     c = Blowfish.new('pass', Blowfish.MODE_CBC, self.iv_blowfish)
     self.assertEqual(unpad(c.decrypt(self.encrypt_bf), c.block_size), b'sensitive information')