Doxygen comments improvement

This commit is contained in:
k-stachowiak 2018-12-13 11:13:51 +01:00 committed by Gilles Peskine
parent dd63359dae
commit b92f9334e4

View File

@ -84,7 +84,7 @@ mbedtls_ccm_context;
* to make references valid, and prepare the context * to make references valid, and prepare the context
* for mbedtls_ccm_setkey() or mbedtls_ccm_free(). * for mbedtls_ccm_setkey() or mbedtls_ccm_free().
* *
* \param ctx The CCM context to initialize. Must not be \c NULL. * \param ctx The CCM context to initialize. This must not be \c NULL.
*/ */
void mbedtls_ccm_init( mbedtls_ccm_context *ctx ); void mbedtls_ccm_init( mbedtls_ccm_context *ctx );
@ -92,10 +92,10 @@ void mbedtls_ccm_init( mbedtls_ccm_context *ctx );
* \brief This function initializes the CCM context set in the * \brief This function initializes the CCM context set in the
* \p ctx parameter and sets the encryption key. * \p ctx parameter and sets the encryption key.
* *
* \param ctx The CCM context to initialize. Must be an initialized * \param ctx The CCM context to initialize. This must be an initialized
* context. * context.
* \param cipher The 128-bit block cipher to use. * \param cipher The 128-bit block cipher to use.
* \param key The encryption key. Must not be \c NULL. * \param key The encryption key. This must not be \c NULL.
* \param keybits The key size in bits. This must be acceptable by the cipher. * \param keybits The key size in bits. This must be acceptable by the cipher.
* *
* \return \c 0 on success. * \return \c 0 on success.
@ -110,7 +110,8 @@ int mbedtls_ccm_setkey( mbedtls_ccm_context *ctx,
* \brief This function releases and clears the specified CCM context * \brief This function releases and clears the specified CCM context
* and underlying cipher sub-context. * and underlying cipher sub-context.
* *
* \param ctx The CCM context to clear. Must be an initialized context. * \param ctx The CCM context to clear. This must be an initialized
* context.
* *
* \note If ctx is \c NULL, the function has no effect. * \note If ctx is \c NULL, the function has no effect.
*/ */
@ -125,26 +126,26 @@ void mbedtls_ccm_free( mbedtls_ccm_context *ctx );
* \p tag = \p output + \p length, and make sure that the * \p tag = \p output + \p length, and make sure that the
* output buffer is at least \p length + \p tag_len wide. * output buffer is at least \p length + \p tag_len wide.
* *
* \param ctx The CCM context to use for encryption. Must be an * \param ctx The CCM context to use for encryption. This must be an
* initialized context. * initialized context.
* \param length The length of the input data in Bytes. * \param length The length of the input data in Bytes.
* \param iv Initialization vector (nonce). Must be a readable buffer of * \param iv Initialization vector (nonce). This must be a readable
* at least \p iv_len Bytes. * buffer of at least \p iv_len Bytes.
* \param iv_len The length of the nonce in Bytes: 7, 8, 9, 10, 11, 12, * \param iv_len The length of the nonce in Bytes: 7, 8, 9, 10, 11, 12,
* or 13. The length L of the message length field is * or 13. The length L of the message length field is
* 15 - \p iv_len. * 15 - \p iv_len.
* \param add The additional data field. If \p add_len is greater than * \param add The additional data field. If \p add_len is greater than
* zero, \p add must be a readable buffer of at least that * zero, \p add must be a readable buffer of at least that
* length. * length. If `pad_len == 0`, this may be \c NULL.
* \param add_len The length of additional data in Bytes. * \param add_len The length of additional data in Bytes.
* Must be less than 2^16 - 2^8. * This must be less than 2^16 - 2^8.
* \param input The buffer holding the input data. If \p length is greater * \param input The buffer holding the input data. If \p length is greater
* than zero, \p input must be a readable buffer of at least * than zero, \p input must be a readable buffer of at least
* that length. * that length.
* \param output The buffer holding the output data. If \p length is greater * \param output The buffer holding the output data. If \p length is greater
* than zero, \p output must be a writable buffer of at least * than zero, \p output must be a writable buffer of at least
* that length. * that length.
* \param tag The buffer holding the authentication field. Must be a * \param tag The buffer holding the authentication field. This must be a
* readable buffer of at least \p tag_len Bytes. * readable buffer of at least \p tag_len Bytes.
* \param tag_len The length of the authentication field to generate in Bytes: * \param tag_len The length of the authentication field to generate in Bytes:
* 4, 6, 8, 10, 12, 14 or 16. * 4, 6, 8, 10, 12, 14 or 16.
@ -171,31 +172,31 @@ int mbedtls_ccm_encrypt_and_tag( mbedtls_ccm_context *ctx, size_t length,
* the tag length has to be encoded into the \p iv passed to * the tag length has to be encoded into the \p iv passed to
* this function. * this function.
* *
* \param ctx The CCM context to use for encryption. Must be an * \param ctx The CCM context to use for encryption. This must be an
* initialized context. * initialized context.
* \param length The length of the input data in Bytes. * \param length The length of the input data in Bytes.
* \param iv Initialization vector (nonce). Must be a readable buffer of * \param iv Initialization vector (nonce). This must be a readable
* at least \p iv_len Bytes. * buffer of at least \p iv_len Bytes.
* \param iv_len The length of the nonce in Bytes: 7, 8, 9, 10, 11, 12, * \param iv_len The length of the nonce in Bytes: 7, 8, 9, 10, 11, 12,
* or 13. The length L of the message length field is * or 13. The length L of the message length field is
* 15 - \p iv_len. * 15 - \p iv_len.
* \param add The additional data field. If \p add_len is greater than * \param add The additional data field. If \p add_len is greater than
* zero, \p add must be a readable buffer of at least that * zero, \p add must be a readable buffer of at least that
* length. * length. If `pad_len == 0`, this may be \c NULL.
* \param add_len The length of additional data in Bytes. * \param add_len The length of additional data in Bytes.
* Must be less than 2^16 - 2^8. * This must be less than 2^16 - 2^8.
* \param input The buffer holding the input data. If \p length is greater * \param input The buffer holding the input data. If \p length is greater
* than zero, \p input must be a readable buffer of at least * than zero, \p input must be a readable buffer of at least
* that length. * that length.
* \param output The buffer holding the output data. If \p length is greater * \param output The buffer holding the output data. If \p length is greater
* than zero, \p output must be a writable buffer of at least * than zero, \p output must be a writable buffer of at least
* that length. * that length.
* \param tag The buffer holding the authentication field. Must be a * \param tag The buffer holding the authentication field. This must be a
* readable buffer of at least \p tag_len Bytes. * readable buffer of at least \p tag_len Bytes.
* \param tag_len The length of the authentication field to generate in Bytes: * \param tag_len The length of the authentication field to generate in Bytes:
* 0, 4, 6, 8, 10, 12, 14 or 16. * 0, 4, 6, 8, 10, 12, 14 or 16.
* *
* \warning Passing 0 as \p tag_len means that the message is no * \warning Passing \c 0 as \p tag_len means that the message is no
* longer authenticated. * longer authenticated.
* *
* \return \c 0 on success. * \return \c 0 on success.
@ -211,26 +212,26 @@ int mbedtls_ccm_star_encrypt_and_tag( mbedtls_ccm_context *ctx, size_t length,
* \brief This function performs a CCM authenticated decryption of a * \brief This function performs a CCM authenticated decryption of a
* buffer. * buffer.
* *
* \param ctx The CCM context to use for decryption. Must be an * \param ctx The CCM context to use for decryption. This must be an
* initialized context. * initialized context.
* \param length The length of the input data in Bytes. * \param length The length of the input data in Bytes.
* \param iv Initialization vector (nonce). Must be a readable buffer of * \param iv Initialization vector (nonce). This must be a readable
* at least \p iv_len Bytes. * buffer of at least \p iv_len Bytes.
* \param iv_len The length of the nonce in Bytes: 7, 8, 9, 10, 11, 12, * \param iv_len The length of the nonce in Bytes: 7, 8, 9, 10, 11, 12,
* or 13. The length L of the message length field is * or 13. The length L of the message length field is
* 15 - \p iv_len. * 15 - \p iv_len.
* \param add The additional data field. If \p add_len is greater than * \param add The additional data field. If \p add_len is greater than
* zero, \p add must be a readable buffer of at least that * zero, \p add must be a readable buffer of at least that
* length. * length. If `pad_len == 0`, this may be \c NULL.
* \param add_len The length of additional data in Bytes. * \param add_len The length of additional data in Bytes.
* Must be less than 2^16 - 2^8. * This must be less than 2^16 - 2^8.
* \param input The buffer holding the input data. If \p length is greater * \param input The buffer holding the input data. If \p length is greater
* than zero, \p input must be a readable buffer of at least * than zero, \p input must be a readable buffer of at least
* that length. * that length.
* \param output The buffer holding the output data. If \p length is greater * \param output The buffer holding the output data. If \p length is greater
* than zero, \p output must be a writable buffer of at least * than zero, \p output must be a writable buffer of at least
* that length. * that length.
* \param tag The buffer holding the authentication field. Must be a * \param tag The buffer holding the authentication field. This must be a
* readable buffer of at least \p tag_len Bytes. * readable buffer of at least \p tag_len Bytes.
* \param tag_len The length of the authentication field to generate in Bytes: * \param tag_len The length of the authentication field to generate in Bytes:
* 4, 6, 8, 10, 12, 14 or 16. * 4, 6, 8, 10, 12, 14 or 16.
@ -254,31 +255,31 @@ int mbedtls_ccm_auth_decrypt( mbedtls_ccm_context *ctx, size_t length,
* this function as \p tag_len. (\p tag needs to be adjusted * this function as \p tag_len. (\p tag needs to be adjusted
* accordingly.) * accordingly.)
* *
* \param ctx The CCM context to use for decryption. Must be an * \param ctx The CCM context to use for decryption. This must be an
* initialized context. * initialized context.
* \param length The length of the input data in Bytes. * \param length The length of the input data in Bytes.
* \param iv Initialization vector (nonce). Must be a readable buffer of * \param iv Initialization vector (nonce). This must be a readable
* at least \p iv_len Bytes. * buffer of at least \p iv_len Bytes.
* \param iv_len The length of the nonce in Bytes: 7, 8, 9, 10, 11, 12, * \param iv_len The length of the nonce in Bytes: 7, 8, 9, 10, 11, 12,
* or 13. The length L of the message length field is * or 13. The length L of the message length field is
* 15 - \p iv_len. * 15 - \p iv_len.
* \param add The additional data field. If \p add_len is greater than * \param add The additional data field. If \p add_len is greater than
* zero, \p add must be a readable buffer of at least that * zero, \p add must be a readable buffer of at least that
* length. * length. If `pad_len == 0`, this may be \c NULL.
* \param add_len The length of additional data in Bytes. * \param add_len The length of additional data in Bytes.
* Must be less than 2^16 - 2^8. * This must be less than 2^16 - 2^8.
* \param input The buffer holding the input data. If \p length is greater * \param input The buffer holding the input data. If \p length is greater
* than zero, \p input must be a readable buffer of at least * than zero, \p input must be a readable buffer of at least
* that length. * that length.
* \param output The buffer holding the output data. If \p length is greater * \param output The buffer holding the output data. If \p length is greater
* than zero, \p output must be a writable buffer of at least * than zero, \p output must be a writable buffer of at least
* that length. * that length.
* \param tag The buffer holding the authentication field. Must be a * \param tag The buffer holding the authentication field. This must be a
* readable buffer of at least \p tag_len Bytes. * readable buffer of at least \p tag_len Bytes.
* \param tag_len The length of the authentication field in Bytes. * \param tag_len The length of the authentication field in Bytes.
* 0, 4, 6, 8, 10, 12, 14 or 16. * 0, 4, 6, 8, 10, 12, 14 or 16.
* *
* \warning Passing 0 as \p tag_len means that the message is no * \warning Passing \c 0 as \p tag_len means that the message is nos
* longer authenticated. * longer authenticated.
* *
* \return \c 0 on success. * \return \c 0 on success.