예제 #1
0
    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))
예제 #2
0
    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))