MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_sha3_512_nist

Method test_sha3_512_nist

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

Source from the content-addressed store, hash-verified

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

Callers 1

test_sha3_512_nistMethod · 0.45

Calls 1

assert_hmacMethod · 0.80

Tested by

no test coverage detected