== How to fix it in pyca === Code examples include::../../common/fix/code-rationale.adoc[] ==== Noncompliant code example [source,python,diff-id=11,diff-type=noncompliant] ---- from cryptography.hazmat.primitives.ciphers import Cipher, algorithms from cryptography.hazmat.backends import default_backend cipher = Cipher(algorithms.TripleDES(key), mode=None, backend=default_backend()) # Noncompliant ---- ==== Compliant solution [source,python,diff-id=11,diff-type=compliant] ---- from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from cryptography.hazmat.backends import default_backend cipher = Cipher(algorithms.AES(key), modes.CBC(iv), backend=default_backend()) ---- === How does this work? include::../../common/fix/strong-cryptography.adoc[]