def test_quick_init(self): key="\x80" + "\x00" * 15 c = CamCrypt(keylen=128, key=key) expected = "6c227f749319a3aa7da235a9bba05a2c" self.assertEqual(expected, c.encrypt(ZERO_BUF).encode("hex"))
def test_encrypt(self): c = CamCrypt() c.keygen(128, "\x80" + "\x00" * 15) expected = "6c227f749319a3aa7da235a9bba05a2c" self.assertEqual(expected, c.encrypt(ZERO_BUF).encode("hex"))