示例#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)
示例#2
0
 def test_encrypt_empty_string(self):
     self.assertEqual(encrypt_to_annotated_block("", CryptoTest.TEST_PAIRS),
                      "")
示例#3
0
文件: tests.py 项目: muccg/yabi
 def test_encrypt_empty_string(self):
     self.assertEqual(encrypt_to_annotated_block("", CryptoTest.TEST_PAIRS), "")
示例#4
0
文件: tests.py 项目: 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)