From 55e445c277726f1a62a8bcf8731f97c703f9871f Mon Sep 17 00:00:00 2001 From: Lukasz Pawelczyk Date: Wed, 27 Jul 2016 11:58:43 +0200 Subject: [PATCH] Clarify yaca_get_output_length usage Change-Id: If029e693155009b15b33b9c7ca1006867fea383b --- api/yaca/yaca_crypto.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/api/yaca/yaca_crypto.h b/api/yaca/yaca_crypto.h index 94ab45c..5806789 100755 --- a/api/yaca/yaca_crypto.h +++ b/api/yaca/yaca_crypto.h @@ -258,14 +258,19 @@ int yaca_context_get_property(const yaca_context_h ctx, void yaca_context_destroy(yaca_context_h ctx); /** - * @brief Returns the output length for a given algorithm. Can only be called - * on an initialized context. + * @brief Returns the minimum required size of the output buffer for a single crypto function call. * * @since_tizen 3.0 * - * @remarks This function can be used to learn the required size of the output buffer - * for a single operation (eg. *_update or *_finalize). In case the operation - * has no input (eg. *_finalize), the value of @a input_len has to be set to 0. + * @remarks This function should be used to learn the required size of the output buffer + * for a single function call (eg. *_update or *_finalize). The actual output length + * (number of bytes that has been used) will be returned by the function call itself. + * + * @remarks In case the function call has no output (e.g. yaca_sign_update(), + * yaca_digest_update()), there is no need to use this function. + * + * @remarks In case the function call has no input (eg. *_finalize), the value of + * @a input_len has to be set to 0. * * @param[in] ctx Previously initialized crypto context * @param[in] input_len Length of the input data to be processed -- 2.7.4