*/
/**
- * @file encrypt.h
+ * @file yaca_encrypt.h
* @brief
*/
*
* @since_tizen 3.0
*
- * @param[out] ctx Newly created context (must be freed with yaca_ctx_free()).
- * @param[in] algo Encryption algorithm that will be used.
- * @param[in] bcm Chaining mode that will be used.
- * @param[in] sym_key Symmetric key that will be used.
- * @param[in] iv Initialization vector that will be used.
+ * @param[out] ctx Newly created context (must be freed with yaca_ctx_free())
+ * @param[in] algo Encryption algorithm that will be used
+ * @param[in] bcm Chaining mode that will be used
+ * @param[in] sym_key Symmetric key that will be used
+ * @param[in] iv Initialization vector that will be used
*
- * @return YACA_ERROR_NONE on success, negative on error.
+ * @return #YACA_ERROR_NONE on success, negative on error
+ * @retval #YACA_ERROR_NONE Succesful
+ * @retval #YACA_ERROR_INVALID_ARGUMENT Required parameters have bogus values (NULL,
+ * incorrect algo, bcm, invalid sym_key or iv)
+ * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error
+ * @retval #YACA_ERROR_INTERNAL Internal error
*
* @see #yaca_enc_algo_e
* @see #yaca_block_cipher_mode_e
*
* @since_tizen 3.0
*
- * @param[in,out] ctx Context created by yaca_encrypt_init().
- * @param[in] plain Plain text to be encrypted.
- * @param[in] plain_len Length of the plain text.
- * @param[out] cipher Buffer for the encrypted data (must be allocated by client, see
- * yaca_get_output_length()).
- * @param[out] cipher_len Length of the encrypted data, actual number of bytes written will be returned here.
+ * @param[in,out] ctx Context created by yaca_encrypt_init()
+ * @param[in] plain Plain text to be encrypted
+ * @param[in] plain_len Length of the plain text
+ * @param[out] cipher Buffer for the encrypted data
+ * (must be allocated by client, see yaca_get_output_length())
+ * @param[out] cipher_len Length of the encrypted data,
+ * actual number of bytes written will be returned here
*
- * @return YACA_ERROR_NONE on success, negative on error.
+ * @return #YACA_ERROR_NONE on success, negative on error
+ * @retval #YACA_ERROR_NONE Succesful
+ * @retval #YACA_ERROR_INVALID_ARGUMENT Required parameters have bogus values (NULL, 0,
+ * incorrect context)
+ * @retval #YACA_ERROR_INTERNAL Internal error
*
* @see yaca_encrypt_init()
* @see yaca_encrypt_final()
*
* @since_tizen 3.0
*
- * @param[in,out] ctx A valid encrypt context.
- * @param[out] cipher Final piece of the encrypted data (must be allocated by client, see
- * yaca_get_block_length()).
- * @param[out] cipher_len Length of the final piece, actual number of bytes written will be returned here.
+ * @param[in,out] ctx A valid encrypt context
+ * @param[out] cipher Final piece of the encrypted data
+ * (must be allocated by client, see yaca_get_block_length())
+ * @param[out] cipher_len Length of the final piece,
+ * actual number of bytes written will be returned here
*
- * @return YACA_ERROR_NONE on success, negative on error.
+ * @return #YACA_ERROR_NONE on success, negative on error
+ * @retval #YACA_ERROR_NONE Succesful
+ * @retval #YACA_ERROR_INVALID_ARGUMENT Required parameters have bogus values (NULL,
+ * incorrect context)
+ * @retval #YACA_ERROR_INTERNAL Internal error
*
* @see yaca_encrypt_init()
* @see yaca_encrypt_update()
*
* @since_tizen 3.0
*
- * @param[out] ctx Newly created context (must be freed with yaca_ctx_free()).
- * @param[in] algo Encryption algorithm that was used to encrypt the data.
- * @param[in] bcm Chaining mode that was used to encrypt the data.
- * @param[in] sym_key Symmetric key that was used to encrypt the data.
- * @param[in] iv Initialization vector that was used to encrypt the data.
+ * @param[out] ctx Newly created context (must be freed with yaca_ctx_free())
+ * @param[in] algo Encryption algorithm that was used to encrypt the data
+ * @param[in] bcm Chaining mode that was used to encrypt the data
+ * @param[in] sym_key Symmetric key that was used to encrypt the data
+ * @param[in] iv Initialization vector that was used to encrypt the data
*
- * @return YACA_ERROR_NONE on success, negative on error.
+ * @return #YACA_ERROR_NONE on success, negative on error
+ * @retval #YACA_ERROR_NONE Succesful
+ * @retval #YACA_ERROR_INVALID_ARGUMENT Required parameters have bogus values (NULL,
+ * incorrect algo, bcm, invalid sym_key or iv)
+ * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error
+ * @retval #YACA_ERROR_INTERNAL Internal error
*
* @see #yaca_enc_algo_e
* @see #yaca_block_cipher_mode_e
*
* @since_tizen 3.0
*
- * @param[in,out] ctx Context created by yaca_decrypt_init().
- * @param[in] cipher Cipher text to be decrypted.
- * @param[in] cipher_len Length of the cipher text.
- * @param[out] plain Buffer for the decrypted data (must be allocated by client, see
- * yaca_get_output_length()).
- * @param[out] plain_len Length of the decrypted data, actual number of bytes written will be returned here.
+ * @param[in,out] ctx Context created by yaca_decrypt_init()
+ * @param[in] cipher Cipher text to be decrypted
+ * @param[in] cipher_len Length of the cipher text
+ * @param[out] plain Buffer for the decrypted data
+ * (must be allocated by client, see yaca_get_output_length())
+ * @param[out] plain_len Length of the decrypted data,
+ * actual number of bytes written will be returned here
*
- * @return YACA_ERROR_NONE on success, negative on error.
+ * @return #YACA_ERROR_NONE on success, negative on error
+ * @retval #YACA_ERROR_NONE Succesful
+ * @retval #YACA_ERROR_INVALID_ARGUMENT Required parameters have bogus values (NULL, 0,
+ * incorrect context)
+ * @retval #YACA_ERROR_INTERNAL Internal error
*
* @see yaca_decrypt_init()
* @see yaca_decrypt_final()
*
* @since_tizen 3.0
*
- * @param[in,out] ctx A valid decrypt context.
- * @param[out] plain Final piece of the decrypted data (must be allocated by client, see
- * yaca_get_block_length()).
- * @param[out] plain_len Length of the final piece, actual number of bytes written will be returned here.
+ * @param[in,out] ctx A valid decrypt context
+ * @param[out] plain Final piece of the decrypted data
+ * (must be allocated by client, see yaca_get_block_length())
+ * @param[out] plain_len Length of the final piece,
+ * actual number of bytes written will be returned here
*
- * @return YACA_ERROR_NONE on success, negative on error.
+ * @return #YACA_ERROR_NONE on success, negative on error
+ * @retval #YACA_ERROR_NONE Succesful
+ * @retval #YACA_ERROR_INVALID_ARGUMENT Required parameters have bogus values (NULL,
+ * incorrect context)
+ * @retval #YACA_ERROR_INTERNAL Internal error
*
* @see yaca_decrypt_init()
* @see yaca_decrypt_update()
* @remarks If returned iv_bits equals 0 that means that for this
* specific algorithm and its parameters IV is not used.
*
- * @param[in] algo Encryption algorithm.
- * @param[in] bcm Chain mode.
- * @param[in] key_bits Key length in bits.
- * @param[out] iv_bits Recommended IV length in bits.
+ * @param[in] algo Encryption algorithm
+ * @param[in] bcm Chain mode
+ * @param[in] key_bits Key length in bits
+ * @param[out] iv_bits Recommended IV length in bits
+ *
+ * @return #YACA_ERROR_NONE on success, negative on error
+ * @retval #YACA_ERROR_NONE Succesful
+ * @retval #YACA_ERROR_INVALID_ARGUMENT Required parameters have bogus values (NULL,
+ * invalid algo, bcm or key_bits)
+ * @retval #YACA_ERROR_INTERNAL Internal error
*
- * @return YACA_ERROR_NONE on success, negative on error.
*/
int yaca_get_iv_bits(yaca_enc_algo_e algo,
yaca_block_cipher_mode_e bcm,