mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-29 00:18:06 -04:00
Fix doc on buffer requirements of GCM API
Signed-off-by: Chien Wong <m@xv97.com>
This commit is contained in:
parent
0b7faf9011
commit
89bbc3a4c5
@ -109,10 +109,9 @@ int mbedtls_gcm_setkey(mbedtls_gcm_context *ctx,
|
|||||||
/**
|
/**
|
||||||
* \brief This function performs GCM encryption or decryption of a buffer.
|
* \brief This function performs GCM encryption or decryption of a buffer.
|
||||||
*
|
*
|
||||||
* \note For encryption, the output buffer can be the same as the
|
* \note The output buffer \p output can be the same as the input
|
||||||
* input buffer. For decryption, the output buffer cannot be
|
* buffer \p input. If \p output is greater than \p input, they
|
||||||
* the same as input buffer. If the buffers overlap, the output
|
* cannot overlap.
|
||||||
* buffer must trail at least 8 Bytes behind the input buffer.
|
|
||||||
*
|
*
|
||||||
* \warning When this function performs a decryption, it outputs the
|
* \warning When this function performs a decryption, it outputs the
|
||||||
* authentication tag and does not verify that the data is
|
* authentication tag and does not verify that the data is
|
||||||
@ -173,9 +172,9 @@ int mbedtls_gcm_crypt_and_tag(mbedtls_gcm_context *ctx,
|
|||||||
* \brief This function performs a GCM authenticated decryption of a
|
* \brief This function performs a GCM authenticated decryption of a
|
||||||
* buffer.
|
* buffer.
|
||||||
*
|
*
|
||||||
* \note For decryption, the output buffer cannot be the same as
|
* \note The output buffer \p output can be the same as the input
|
||||||
* input buffer. If the buffers overlap, the output buffer
|
* buffer \p input. If \p output is greater than \p input, they
|
||||||
* must trail at least 8 Bytes behind the input buffer.
|
* cannot overlap.
|
||||||
*
|
*
|
||||||
* \param ctx The GCM context. This must be initialized.
|
* \param ctx The GCM context. This must be initialized.
|
||||||
* \param length The length of the ciphertext to decrypt, which is also
|
* \param length The length of the ciphertext to decrypt, which is also
|
||||||
@ -281,9 +280,9 @@ int mbedtls_gcm_update_ad(mbedtls_gcm_context *ctx,
|
|||||||
* to this function during an operation, then it is
|
* to this function during an operation, then it is
|
||||||
* correct to use \p output_size = \p input_length.
|
* correct to use \p output_size = \p input_length.
|
||||||
*
|
*
|
||||||
* \note For decryption, the output buffer cannot be the same as
|
* \note The output buffer \p output can be the same as the input
|
||||||
* input buffer. If the buffers overlap, the output buffer
|
* buffer \p input. If \p output is greater than \p input, they
|
||||||
* must trail at least 8 Bytes behind the input buffer.
|
* cannot overlap.
|
||||||
*
|
*
|
||||||
* \param ctx The GCM context. This must be initialized.
|
* \param ctx The GCM context. This must be initialized.
|
||||||
* \param input The buffer holding the input data. If \p input_length
|
* \param input The buffer holding the input data. If \p input_length
|
||||||
|
Loading…
x
Reference in New Issue
Block a user