コード例 #1
0
ファイル: client.py プロジェクト: Pringley/edb
 def block_encrypt(self, plaintext):
     """Return the deterministically preencrypted word."""
     return crypto.encrypt(self.keys['encrypt'], plaintext)
コード例 #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
コード例 #3
0
ファイル: client.py プロジェクト: b4lmung/edb
 def block_encrypt(self, plaintext):
     """Return the deterministically preencrypted word."""
     return crypto.encrypt(self.keys['encrypt'], plaintext)