MCPcopy Create free account
hub / github.com/python/cpython / test_sha3_256_nist

Method test_sha3_256_nist

Lib/test/test_hmac.py:638–661  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

636 )
637
638 def test_sha3_256_nist(self):
639 for key, msg, hexdigest in [
640 (
641 bytes(range(32)),
642 b'Sample message for keylen<blocklen',
643 '4fe8e202c4f058e8dddc23d8c34e4673'
644 '43e23555e24fc2f025d598f558f67205'
645 ), (
646 bytes(range(136)),
647 b'Sample message for keylen=blocklen',
648 '68b94e2e538a9be4103bebb5aa016d47'
649 '961d4d1aa906061313b557f8af2c3faa'
650 ), (
651 bytes(range(168)),
652 b'Sample message for keylen>blocklen',
653 '9bcf2c238e235c3ce88404e813bd2f3a'
654 '97185ac6f238c63d6229a00b07974258'
655 )
656 ]:
657 self.assert_hmac(
658 key, msg, hexdigest,
659 hashfunc=self.sha3_256, hashname='sha3_256',
660 digest_size=32, block_size=136
661 )
662
663 def test_sha3_384_nist(self):
664 for key, msg, hexdigest in [

Callers

nothing calls this directly

Calls 1

assert_hmacMethod · 0.80

Tested by

no test coverage detected