Did I find the right examples for you? yes no

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

src/l/a/lacore-0.1.3/lacore/t/test_cipher.py   lacore(Download)
    def test_xor(self):
        from lacore.cipher.xor import CipherXOR
        self.assertRaises(ValueError, CipherXOR, '1')
        cipher = CipherXOR(a2b_hex('ff00ff00ff00ff00'))
        self.assertEqual("5aa55aa55aa55aa5"*2+"f708f708f708f708", b2a_hex(
    def test_xor_dec(self):
        from lacore.cipher.xor import CipherXOR
        c1 = CipherXOR(a2b_hex('ff00ff00ff00ff00'))
        c2 = CipherXOR(a2b_hex('ff00ff00ff00ff00'))
        self.assertFalse(c2.decipher(c1.encipher("a5a5")))  # 4