Beispiel #1
0
 def test_encrypt(self):
     for plaintext, encrypted in CryptoTest.TEST_PAIRS:
         self.assertEqual(
             encrypt_to_annotated_block(plaintext,
                                        CryptoTest.TEST_KEY,
                                        nonce=CryptoTest.TEST_NONCE),
             encrypted)
Beispiel #2
0
 def test_encrypt_empty_string(self):
     self.assertEqual(encrypt_to_annotated_block("", CryptoTest.TEST_PAIRS),
                      "")
Beispiel #3
0
 def test_encrypt_empty_string(self):
     self.assertEqual(encrypt_to_annotated_block("", CryptoTest.TEST_PAIRS), "")
Beispiel #4
0
 def test_encrypt(self):
     for plaintext, encrypted in CryptoTest.TEST_PAIRS:
         self.assertEqual(encrypt_to_annotated_block(plaintext, CryptoTest.TEST_KEY, nonce=CryptoTest.TEST_NONCE), encrypted)