Exemple #1
0
 def block_decrypt(self, ciphertext):
     """Return the decrypted block."""
     return crypto.decrypt(self.keys['encrypt'], ciphertext)
Exemple #2
0
 def test_block_encrypt(self):
     key = self.keys['foo']
     message = b"7" * constants.BLOCK_BYTES
     ciphertext = crypto.encrypt(key, message)
     assert crypto.decrypt(key, ciphertext) == message
Exemple #3
0
 def block_decrypt(self, ciphertext):
     """Return the decrypted block."""
     return crypto.decrypt(self.keys['encrypt'], ciphertext)