Example #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)
Example #2
0
 def test_encrypt_empty_string(self):
     self.assertEqual(encrypt_to_annotated_block("", CryptoTest.TEST_PAIRS),
                      "")
Example #3
0
File: tests.py Project: muccg/yabi
 def test_encrypt_empty_string(self):
     self.assertEqual(encrypt_to_annotated_block("", CryptoTest.TEST_PAIRS), "")
Example #4
0
File: tests.py Project: muccg/yabi
 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)