From 507d926da825fbc1d9d74b4517dbab47702c66b9 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Thu, 1 Sep 2016 13:40:26 -0400 Subject: Cipher_Mode API improvements The Cipher_Mode::update API is more general than needed to just support ciphers (this is due to it previously being an API of Transform which before 8b85b780515 was Cipher_Mode's base class) Define a less general interface `process` which either processes the blocks in-place, producing exactly as much output as there was input, or (SIV/CCM case) saves the entire message for processing in `finish`. These two uses cover all current or anticipated cipher modes. Leaves `update` for compatability with existing callers; all that is needed is an inline function forwarding to `process`. Removes the return type from `start` - in all cipher implementations, this always returned an empty vector. Adds BOTAN_ARG_CHECK macro; right now BOTAN_ASSERT is being used for argument checking in some places, which is not right at all. --- doc/manual/aead.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/manual/aead.rst b/doc/manual/aead.rst index 5ab33c849..d216026bb 100644 --- a/doc/manual/aead.rst +++ b/doc/manual/aead.rst @@ -41,8 +41,6 @@ support a 128-bit block cipher such as AES. EAX and SIV also support Start processing a message, using *nonce* as the unique per-message value. - Returns any initial data that should be emitted (for instance a header). - .. cpp:function:: void update(secure_vector& buffer, size_t offset = 0) Continue processing a message. The *buffer* is an in/out parameter and @@ -79,7 +77,7 @@ support a 128-bit block cipher such as AES. EAX and SIV also support .. cpp:function:: size_t update_granularity() const The AEAD interface requires :cpp:func:`update` be called with blocks of - this size. + this size. This will be 1, if the mode can process any length inputs. .. cpp:function:: size_t final_minimum_size() const -- cgit v1.2.3