diff options
| author | David Reid <dreid@dreid.org> | 2013-11-01 16:37:07 -0700 | 
|---|---|---|
| committer | David Reid <dreid@dreid.org> | 2013-11-01 16:37:07 -0700 | 
| commit | 178f6f19a611219f27a0b4e1837134b308de08d2 (patch) | |
| tree | 1861e7ab88696a36ef7619456f7b374e20e2244a | |
| parent | 33675c3c1d08507ca73b01428ae99b5200af830e (diff) | |
| parent | bf2de7458aebbc6bc855e9f145cf9a40ceec033e (diff) | |
| download | cryptography-178f6f19a611219f27a0b4e1837134b308de08d2.tar.gz cryptography-178f6f19a611219f27a0b4e1837134b308de08d2.tar.bz2 cryptography-178f6f19a611219f27a0b4e1837134b308de08d2.zip  | |
Merge pull request #211 from alex/stream-ciphers
Document how this returns bytes
| -rw-r--r-- | docs/hazmat/primitives/symmetric-encryption.rst | 9 | 
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/hazmat/primitives/symmetric-encryption.rst b/docs/hazmat/primitives/symmetric-encryption.rst index 5852dc21..b8b1c839 100644 --- a/docs/hazmat/primitives/symmetric-encryption.rst +++ b/docs/hazmat/primitives/symmetric-encryption.rst @@ -63,6 +63,12 @@ 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 (e.g. +        :class:`cryptography.hazmat.primitives.block.modes.CTR`), this will +        return bytes immediately, however in other modes it will return chunks, +        whose size is determined by the cipher's block size. +      .. method:: finalize()          :return bytes: Returns the remainder of the data. @@ -162,7 +168,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  | 
