MCPcopy
hub / github.com/pyca/cryptography / test_data_too_large

Method test_data_too_large

tests/hazmat/primitives/test_aead.py:1036–1049  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1034 reason="mmap and 64-bit platform required",
1035 )
1036 def test_data_too_large(self):
1037 key = AESSIV.generate_key(256)
1038 aessiv = AESSIV(key)
1039
1040 large_data = large_mmap()
1041
1042 with pytest.raises(OverflowError):
1043 aessiv.encrypt(large_data, None)
1044
1045 with pytest.raises(OverflowError):
1046 aessiv.encrypt(b"irrelevant", [large_data])
1047
1048 with pytest.raises(OverflowError):
1049 aessiv.decrypt(b"very very irrelevant", [large_data])
1050
1051 def test_empty(self):
1052 key = AESSIV.generate_key(256)

Callers

nothing calls this directly

Calls 4

large_mmapFunction · 0.85
generate_keyMethod · 0.80
encryptMethod · 0.45
decryptMethod · 0.45

Tested by

no test coverage detected