Lines Matching refs:compare_digest
16 from _hashlib import compare_digest as openssl_compare_digest
513 self._test_compare_digest(hmac.compare_digest)
515 self.assertIs(hmac.compare_digest, openssl_compare_digest)
517 self.assertIs(hmac.compare_digest, operator_compare_digest)
526 def _test_compare_digest(self, compare_digest): argument
529 self.assertRaises(TypeError, compare_digest, a, b)
531 self.assertRaises(TypeError, compare_digest, a, b)
533 self.assertRaises(TypeError, compare_digest, a, b)
535 self.assertRaises(TypeError, compare_digest, a, b)
537 self.assertRaises(TypeError, compare_digest, a, b)
541 self.assertFalse(compare_digest(a, b))
543 self.assertFalse(compare_digest(a, b))
547 self.assertFalse(compare_digest(a, b))
549 self.assertFalse(compare_digest(a, b))
553 self.assertTrue(compare_digest(a, b))
555 self.assertTrue(compare_digest(a, b))
559 self.assertTrue(compare_digest(a, b))
563 self.assertFalse(compare_digest(a, b))
567 self.assertFalse(compare_digest(a, b))
571 self.assertTrue(compare_digest(a, b))
572 self.assertTrue(compare_digest(b, a))
576 self.assertFalse(compare_digest(a, b))
577 self.assertFalse(compare_digest(b, a))
581 self.assertFalse(compare_digest(a, b))
582 self.assertFalse(compare_digest(b, a))
586 self.assertTrue(compare_digest(a, b))
590 self.assertFalse(compare_digest(a, b))
594 self.assertFalse(compare_digest(a, b))
598 self.assertRaises(TypeError, compare_digest, a, b)
600 self.assertRaises(TypeError, compare_digest, a, b)
602 self.assertRaises(TypeError, compare_digest, a, b)
604 self.assertRaises(TypeError, compare_digest, a, b)
606 self.assertRaises(TypeError, compare_digest, a, b)
614 self.assertTrue(compare_digest(a, b))
616 self.assertTrue(compare_digest(a, b))
618 self.assertFalse(compare_digest(a, b))
625 self.assertTrue(compare_digest(a, b))
627 self.assertTrue(compare_digest(a, b))
629 self.assertFalse(compare_digest(a, b))