Lines Matching refs:xor_bytes
20 from rsa._compat import byte, is_bytes, range, xor_bytes
54 self.assertEqual(xor_bytes(self.b1, self.b2), b'\xff\xff\xff\xff')
55 self.assertEqual(xor_bytes(self.b1, self.b3), b'\x0f\x0f\x0f\x0f')
56 self.assertEqual(xor_bytes(self.b1, self.b4), b'\xb2\xdc\x35\x1d')
57 self.assertEqual(xor_bytes(self.b1, self.b5), b'\x64\x9e\xc4\x23')
58 self.assertEqual(xor_bytes(self.b2, self.b3), b'\xf0\xf0\xf0\xf0')
59 self.assertEqual(xor_bytes(self.b2, self.b4), b'\x4d\x23\xca\xe2')
60 self.assertEqual(xor_bytes(self.b2, self.b5), b'\x9b\x61\x3b\xdc')
61 self.assertEqual(xor_bytes(self.b3, self.b4), b'\xbd\xd3\x3a\x12')
62 self.assertEqual(xor_bytes(self.b3, self.b5), b'\x6b\x91\xcb\x2c')
63 self.assertEqual(xor_bytes(self.b4, self.b5), b'\xd6\x42\xf1\x3e')
66 self.assertEqual(xor_bytes(self.b1, self.b6), b'\x00\x00')
67 self.assertEqual(xor_bytes(self.b2, self.b6), b'\xff\xff')
68 self.assertEqual(xor_bytes(self.b3, self.b6), b'\x0f\x0f')
69 self.assertEqual(xor_bytes(self.b4, self.b6), b'\xb2\xdc')
70 self.assertEqual(xor_bytes(self.b5, self.b6), b'\x64\x9e')
71 self.assertEqual(xor_bytes(self.b6, b''), b'')
77 result = xor_bytes(first, second)
79 self.assertEqual(result, xor_bytes(second, first))