MCPcopy Create free account
hub / github.com/pyca/cryptography / test_load_hmac_vectors

Function test_load_hmac_vectors

tests/test_utils.py:329–346  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

327
328
329def test_load_hmac_vectors():
330 vector_data = textwrap.dedent(
331 """
332Len = 224
333# "Jefe"
334Key = 4a656665
335# "what do ya want for nothing?"
336Msg = 7768617420646f2079612077616e7420666f72206e6f7468696e673f
337MD = 750c783e6ab0b503eaa86e310a5db738
338 """
339 ).splitlines()
340 assert load_hash_vectors(vector_data) == [
341 (
342 b"7768617420646f2079612077616e7420666f72206e6f7468696e673f",
343 "750c783e6ab0b503eaa86e310a5db738",
344 b"4a656665",
345 ),
346 ]
347
348
349def test_load_hash_vectors_bad_data():

Callers

nothing calls this directly

Calls 1

load_hash_vectorsFunction · 0.85

Tested by

no test coverage detected