diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-04 12:19:17 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-04 12:19:17 -0800 |
commit | ac6e02a0813e66f5e7cf75be0b3c7885a292c291 (patch) | |
tree | bc99e8f3f37e383d8ba166dec829fc1fe44ed92f /docs/hazmat | |
parent | 4969751fde0ef09cd72c738a80c32851c1b1f21d (diff) | |
parent | d68fd37ec18c5adfa580d989730f7988d72d2bea (diff) | |
download | cryptography-ac6e02a0813e66f5e7cf75be0b3c7885a292c291.tar.gz cryptography-ac6e02a0813e66f5e7cf75be0b3c7885a292c291.tar.bz2 cryptography-ac6e02a0813e66f5e7cf75be0b3c7885a292c291.zip |
Merge branch 'master' into setup-install-extension
Conflicts:
cryptography/hazmat/bindings/openssl/binding.py
Diffstat (limited to 'docs/hazmat')
-rw-r--r-- | docs/hazmat/primitives/interfaces.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index 361b723e..edb24cd9 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -67,6 +67,18 @@ Interfaces used by the symmetric cipher modes described in The name may be used by a backend to influence the operation of a cipher in conjunction with the algorithm's name. + .. method:: validate_for_algorithm(algorithm) + + :param CipherAlgorithm algorithm: + + Checks that the combination of this mode with the provided algorithm + meets any necessary invariants. This should raise an exception if they + are not met. + + For example, the :class:`~cryptography.hazmat.primitives.modes.CBC` + mode uses this method to check that the provided initialization + vector's length matches the block size of the algorithm. + .. class:: ModeWithInitializationVector |