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

Method test_sha3_512_nist

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

Source from the content-addressed store, hash-verified

689 )
690
691 def test_sha3_512_nist(self):
692 for key, msg, hexdigest in [
693 (
694 bytes(range(64)),
695 b'Sample message for keylen<blocklen',
696 '4efd629d6c71bf86162658f29943b1c3'
697 '08ce27cdfa6db0d9c3ce81763f9cbce5'
698 'f7ebe9868031db1a8f8eb7b6b95e5c5e'
699 '3f657a8996c86a2f6527e307f0213196'
700 ), (
701 bytes(range(72)),
702 b'Sample message for keylen=blocklen',
703 '544e257ea2a3e5ea19a590e6a24b724c'
704 'e6327757723fe2751b75bf007d80f6b3'
705 '60744bf1b7a88ea585f9765b47911976'
706 'd3191cf83c039f5ffab0d29cc9d9b6da'
707 ), (
708 bytes(range(136)),
709 b'Sample message for keylen>blocklen',
710 '5f464f5e5b7848e3885e49b2c385f069'
711 '4985d0e38966242dc4a5fe3fea4b37d4'
712 '6b65ceced5dcf59438dd840bab22269f'
713 '0ba7febdb9fcf74602a35666b2a32915'
714 )
715 ]:
716 self.assert_hmac(
717 key, msg, hexdigest,
718 hashfunc=self.sha3_512, hashname='sha3_512',
719 digest_size=64, block_size=72
720 )
721
722
723class PurePythonInitHMAC(PyModuleMixin, HashFunctionsTrait):

Callers

nothing calls this directly

Calls 1

assert_hmacMethod · 0.80

Tested by

no test coverage detected