Document that the ciphertext and plaintext may share a buffer when encrypting and decrypting

This commit is contained in:
Mark Haines 2015-08-19 15:39:19 +01:00
parent 900d2d70b4
commit a378a40b3a

View file

@ -47,6 +47,8 @@ public:
* output |--ciphertext_length-->| |---mac_length-->| * output |--ciphertext_length-->| |---mac_length-->|
* ciphertext * ciphertext
* *
* The plain-text pointers and cipher-text pointers may be the same.
*
* Returns std::size_t(-1) if the length of the cipher-text or the output * Returns std::size_t(-1) if the length of the cipher-text or the output
* buffer is too small. Otherwise returns the length of the output buffer. * buffer is too small. Otherwise returns the length of the output buffer.
*/ */
@ -73,6 +75,8 @@ public:
* input |--ciphertext_length-->| |---mac_length-->| * input |--ciphertext_length-->| |---mac_length-->|
* ciphertext * ciphertext
* *
* The plain-text pointers and cipher-text pointers may be the same.
*
* Returns std::size_t(-1) if the length of the plain-text buffer is too * Returns std::size_t(-1) if the length of the plain-text buffer is too
* small or if the authentication check fails. Otherwise returns the length * small or if the authentication check fails. Otherwise returns the length
* of the plain text. * of the plain text.