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

Function test_reset_nonce_invalid_mode

tests/hazmat/primitives/test_aes.py:366–377  ·  view source on GitHub ↗
(backend)

Source from the content-addressed store, hash-verified

364
365
366def test_reset_nonce_invalid_mode(backend):
367 iv = b"\x00" * 16
368 c = base.Cipher(
369 algorithms.AES(b"\x00" * 16),
370 modes.CBC(iv),
371 )
372 enc = c.encryptor()
373 with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_CIPHER):
374 enc.reset_nonce(iv)
375 dec = c.decryptor()
376 with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_CIPHER):
377 dec.reset_nonce(iv)

Callers

nothing calls this directly

Calls 4

encryptorMethod · 0.95
decryptorMethod · 0.95
reset_nonceMethod · 0.80

Tested by

no test coverage detected