def test_compare(self): x = "1234" y = "1234" z = "1233" self.assertTrue(botan2.const_time_compare(x, y)) self.assertFalse(botan2.const_time_compare(x, z)) self.assertFalse(botan2.const_time_compare(x, x + z))