diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-01 14:12:35 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-01 14:12:35 -0700 |
commit | d1f0201fd80659395a8444efe11ba24473c212e5 (patch) | |
tree | fca26590039a44450dc09506e44f4f99931d8e58 /docs/hazmat/primitives | |
parent | ce46b89eed2d3a35043910c62f711690cb69c393 (diff) | |
download | cryptography-d1f0201fd80659395a8444efe11ba24473c212e5.tar.gz cryptography-d1f0201fd80659395a8444efe11ba24473c212e5.tar.bz2 cryptography-d1f0201fd80659395a8444efe11ba24473c212e5.zip |
Document how this returns bytes
Diffstat (limited to 'docs/hazmat/primitives')
-rw-r--r-- | docs/hazmat/primitives/symmetric-encryption.rst | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/hazmat/primitives/symmetric-encryption.rst b/docs/hazmat/primitives/symmetric-encryption.rst index 5852dc21..a0e76506 100644 --- a/docs/hazmat/primitives/symmetric-encryption.rst +++ b/docs/hazmat/primitives/symmetric-encryption.rst @@ -63,6 +63,11 @@ where the encrypter and decrypter both use the same key. :param bytes data: The data you wish to pass into the context. :return bytes: Returns the data that was encrypted or decrypted. + When the ``BlockCipher`` was constructed in a mode turns it into a + stream cipher, this will return bytes immediately, however in other + modes it will return blocks in chunks, whose size is determined by the + cipher's block size. + .. method:: finalize() :return bytes: Returns the remainder of the data. @@ -162,7 +167,8 @@ Modes block size of less than 128-bits. CTR (Counter) is a mode of operation for block ciphers. It is considered - cryptographically strong. + cryptographically strong. It transforms a block cipher into a stream + cipher. :param bytes nonce: Should be random bytes. It is critical to never reuse a ``nonce`` with a given key. Any reuse of a nonce |