From 19a43a232b6eeff11a965c3879308bf80c7e9803 Mon Sep 17 00:00:00 2001 From: Dongsun Lee Date: Wed, 29 Jun 2016 11:48:06 +0900 Subject: [PATCH] error fix in API description doxygen - fix typos(mangement, createing, verifing) - too short description(Context, key) - the third person singular should be used in @brief - remove unnecessary blanks and unexpected capital - fix wrong description(If @a *memory is -> If @a memory is) Change-Id: I9185ad0aca7ea8bac460fbc7e6bf406ac66870af Signed-off-by: Dongsun Lee --- api/yaca/yaca_crypto.h | 4 ++-- api/yaca/yaca_digest.h | 1 - api/yaca/yaca_encrypt.h | 1 - api/yaca/yaca_error.h | 1 - api/yaca/yaca_key.h | 17 ++++++++--------- api/yaca/yaca_seal.h | 1 - api/yaca/yaca_sign.h | 1 - api/yaca/yaca_simple.h | 15 +++++++-------- api/yaca/yaca_types.h | 6 ++---- doc/yaca_doc.h | 16 ++++++++-------- doc/yaca_integrity_doc.h | 2 +- 11 files changed, 28 insertions(+), 37 deletions(-) diff --git a/api/yaca/yaca_crypto.h b/api/yaca/yaca_crypto.h index d836013..a02583f 100755 --- a/api/yaca/yaca_crypto.h +++ b/api/yaca/yaca_crypto.h @@ -18,7 +18,6 @@ /** * @file yaca_crypto.h - * @brief */ #ifndef YACA_CRYPTO_H @@ -123,7 +122,7 @@ int yaca_zalloc(size_t size, void **memory); * * @remarks In case of failure the function doesn't free the memory pointed by @a memory. * - * @remarks If @a *memory is NULL then the call is equivalent to yaca_malloc(). + * @remarks If @a memory is NULL then the call is equivalent to yaca_malloc(). * * @remarks If the function fails the contents of @a memory will be left unchanged. * @@ -168,6 +167,7 @@ void yaca_free(void *memory); * * @return #YACA_ERROR_NONE when buffers are equal otherwise #YACA_ERROR_DATA_MISMATCH * @retval #YACA_ERROR_NONE Successful + * @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0) * @retval #YACA_ERROR_DATA_MISMATCH Buffers are different */ int yaca_memcmp(const void *first, const void *second, size_t len); diff --git a/api/yaca/yaca_digest.h b/api/yaca/yaca_digest.h index a303617..85ed809 100755 --- a/api/yaca/yaca_digest.h +++ b/api/yaca/yaca_digest.h @@ -18,7 +18,6 @@ /** * @file yaca_digest.h - * @brief */ #ifndef YACA_DIGEST_H diff --git a/api/yaca/yaca_encrypt.h b/api/yaca/yaca_encrypt.h index 947b392..16892d1 100755 --- a/api/yaca/yaca_encrypt.h +++ b/api/yaca/yaca_encrypt.h @@ -18,7 +18,6 @@ /** * @file yaca_encrypt.h - * @brief */ #ifndef YACA_ENCRYPT_H diff --git a/api/yaca/yaca_error.h b/api/yaca/yaca_error.h index 13c291a..7acb14e 100755 --- a/api/yaca/yaca_error.h +++ b/api/yaca/yaca_error.h @@ -18,7 +18,6 @@ /** * @file yaca_error.h - * @brief */ #ifndef YACA_ERROR_H diff --git a/api/yaca/yaca_key.h b/api/yaca/yaca_key.h index c686b2a..f4809b6 100755 --- a/api/yaca/yaca_key.h +++ b/api/yaca/yaca_key.h @@ -18,7 +18,6 @@ /** * @file yaca_key.h - * @brief */ #ifndef YACA_KEY_H @@ -50,7 +49,7 @@ extern "C" { #define YACA_KEY_NULL ((yaca_key_h) NULL) /** - * @brief Get key's type. + * @brief Gets key's type. * * @since_tizen 3.0 * @@ -64,7 +63,7 @@ extern "C" { int yaca_key_get_type(const yaca_key_h key, yaca_key_type_e *key_type); /** - * @brief Get key's length (in bits). + * @brief Gets key's length (in bits). * * @since_tizen 3.0 * @@ -83,7 +82,7 @@ int yaca_key_get_bit_length(const yaca_key_h key, size_t *key_bit_len); * * @since_tizen 3.0 * - * @remarks This function imports a key trying to match it to the key_type specified. + * @remarks This function imports a key trying to match it to the @a key_type specified. * It should autodetect both the key format and the file format. * * @remarks For symmetric, IV and DES keys RAW binary format and BASE64 encoded @@ -115,7 +114,7 @@ int yaca_key_get_bit_length(const yaca_key_h key, size_t *key_bit_len); * @return #YACA_ERROR_NONE on success, negative on error * @retval #YACA_ERROR_NONE Successful * @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - * invalid key_type or data_len too big) + * invalid @a key_type or @a data_len too big) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @retval #YACA_ERROR_INVALID_PASSWORD Invalid password given or password was required @@ -174,7 +173,7 @@ int yaca_key_import(yaca_key_type_e key_type, * @return #YACA_ERROR_NONE on success, negative on error * @retval #YACA_ERROR_NONE Successful * @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - * invalid key/file format or data_len too big) + * invalid key/file format or @ data_len too big) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -209,8 +208,8 @@ int yaca_key_export(const yaca_key_h key, * * @return #YACA_ERROR_NONE on success, negative on error * @retval #YACA_ERROR_NONE Successful - * @retval #YACA_ERROR_INVALID_PARAMETER key is NULL, incorrect key_type or - * key_bit_len is not dividable by 8 + * @retval #YACA_ERROR_INVALID_PARAMETER key is NULL, incorrect @a key_type or + * @a key_bit_len is not dividable by 8 * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -234,7 +233,7 @@ int yaca_key_generate(yaca_key_type_e key_type, * * @return #YACA_ERROR_NONE on success, negative on error * @retval #YACA_ERROR_NONE Successful - * @retval #YACA_ERROR_INVALID_PARAMETER prv_key is of invalid type or pub_key is NULL + * @retval #YACA_ERROR_INVALID_PARAMETER @a prv_key is of invalid type or @a pub_key is NULL * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * diff --git a/api/yaca/yaca_seal.h b/api/yaca/yaca_seal.h index 041211c..d97a909 100755 --- a/api/yaca/yaca_seal.h +++ b/api/yaca/yaca_seal.h @@ -18,7 +18,6 @@ /** * @file yaca_seal.h - * @brief */ #ifndef YACA_SEAL_H diff --git a/api/yaca/yaca_sign.h b/api/yaca/yaca_sign.h index ec3209a..f06450d 100755 --- a/api/yaca/yaca_sign.h +++ b/api/yaca/yaca_sign.h @@ -18,7 +18,6 @@ /** * @file yaca_sign.h - * @brief */ #ifndef YACA_SIGN_H diff --git a/api/yaca/yaca_simple.h b/api/yaca/yaca_simple.h index efcd3c4..f0d958a 100755 --- a/api/yaca/yaca_simple.h +++ b/api/yaca/yaca_simple.h @@ -18,7 +18,6 @@ /** * @file yaca_simple.h - * @brief */ #ifndef YACA_SIMPLE_H @@ -50,7 +49,7 @@ extern "C" { */ /** - * @brief Calculate a digest of a buffer. + * @brief Calculates a digest of a buffer. * * @since_tizen 3.0 * @@ -79,7 +78,7 @@ int yaca_simple_calculate_digest(yaca_digest_algorithm_e algo, size_t *digest_len); /** - * @brief Encrypt data using a symmetric cipher. + * @brief Encrypts data using a symmetric cipher. * * @since_tizen 3.0 * @@ -116,7 +115,7 @@ int yaca_simple_encrypt(yaca_encrypt_algorithm_e algo, size_t *ciphertext_len); /** - * @brief Decrypt data using a symmetric cipher. + * @brief Decrypts data using a symmetric cipher. * * @since_tizen 3.0 * @@ -153,7 +152,7 @@ int yaca_simple_decrypt(yaca_encrypt_algorithm_e algo, size_t *plaintext_len); /** - * @brief Create a signature using asymmetric private key. + * @brief Creates a signature using asymmetric private key. * * @since_tizen 3.0 * @@ -189,7 +188,7 @@ int yaca_simple_calculate_signature(yaca_digest_algorithm_e algo, size_t *signature_len); /** - * @brief Verify a signature using asymmetric public key. + * @brief Verifies a signature using asymmetric public key. * * @since_tizen 3.0 * @@ -223,7 +222,7 @@ int yaca_simple_verify_signature(yaca_digest_algorithm_e algo, size_t signature_len); /** - * @brief Calculate a HMAC of given message using symmetric key. + * @brief Calculates a HMAC of given message using symmetric key. * * @since_tizen 3.0 * @@ -261,7 +260,7 @@ int yaca_simple_calculate_hmac(yaca_digest_algorithm_e algo, size_t *mac_len); /** - * @brief Calculate a CMAC of given message using symmetric key. + * @brief Calculates a CMAC of given message using symmetric key. * * @since_tizen 3.0 * diff --git a/api/yaca/yaca_types.h b/api/yaca/yaca_types.h index 19bb45c..f46ea34 100755 --- a/api/yaca/yaca_types.h +++ b/api/yaca/yaca_types.h @@ -18,7 +18,6 @@ /** * @file yaca_types.h - * @brief */ #ifndef YACA_TYPES_H @@ -40,14 +39,14 @@ extern "C" { */ /** - * @brief Context. + * @brief The context handle. * * @since_tizen 3.0 */ typedef struct yaca_context_s *yaca_context_h; /** - * @brief Key. + * @brief The key handle. * * @since_tizen 3.0 */ @@ -214,7 +213,6 @@ typedef enum { * #YACA_BCM_ECB * - see #yaca_block_cipher_mode_e for details on additional properties (mandatory). * - Use double DES keys to perform corresponding 2-key 3DES encryption. - */ YACA_ENCRYPT_UNSAFE_3DES_2TDEA, diff --git a/doc/yaca_doc.h b/doc/yaca_doc.h index e63e233..3259591 100755 --- a/doc/yaca_doc.h +++ b/doc/yaca_doc.h @@ -18,9 +18,9 @@ /** * @ingroup CAPI_SECURITY_FRAMEWORK * @defgroup CAPI_YACA_MODULE yaca crypto module - * @brief The yaca(yet another crypto api) provides a crypto function such as key management , Data Integrity and data en/decryption . - * Key mangement provides APIs for generating secured key,importing a key trying to match it to the key_type specified and exporting a key to arbitrary format. - * Data Integrity provides Advanced/Simpled API for the integrity handling - HMAC, CMAC, message digest and digital signature. + * @brief The yaca(yet another crypto api) provides a crypto function such as key management, data integrity and data en/decryption. + * Key management provides APIs for generating secured key,importing a key trying to match it to the key_type specified and exporting a key to arbitrary format. + * Data Integrity provides Advanced/Simpled API for the integrity handling - HMAC, CMAC, message digests and digital signature. * Data en/decryption provides Advanced/Simpled APIs for en/decrypting and sealing/opening a data. * * @section CAPI_YACA_MODULE_OVERVIEW Overview @@ -44,17 +44,17 @@ * * * - * The yaca provides a crypto function such as key management, integrity handling and data en/decryption. - * Key mangement provides APIs for generating secured key, importing a key trying to match it to the key_type specified and exporting a key to arbitrary format. - * Data Integrity provides Advanced/Simpled API for the integrity handling - HMAC, CMAC, message digests and digital signature. - * Data en/decryption provides Advanced/Simpled APIs for en/decrypting and sealing/opening a data. + * The yaca provides a crypto function such as key management, integrity handling and data en/decryption. + * Key management provides APIs for generating secured key, importing a key trying to match it to the key type specified and exporting a key to arbitrary format. + * Data Integrity provides Advanced/Simpled API for the integrity handling - HMAC, CMAC, message digest and digital signature. + * Data en/decryption provides Advanced/Simpled APIs for en/decrypting a data and creating a IV. * * @image html capi_yaca_overview_diagram.png * * The yaca provides 3 types of API. * - key management APIs : These APIs provides generating key using random number or password, importing a key trying to match it to the key_type specified and exporting a key to arbitrary format. * - data en/decryption APIs : These APIs provides Advanced/Simpled API for the data encryption. - * - integrity APIs : These APIs provides creating a signature using asymmetric private key, verifing a signature using asymmetric public key, calculating a HMAC/CMAC of given message using symmetric key and calculating message digests of given message without key. + * - integrity APIs : These APIs provides creating a signature using asymmetric private key, verifying a signature using asymmetric public key, calculating a HMAC/CMAC of given message using symmetric key and calculating message digests of given message without key. * * */ diff --git a/doc/yaca_integrity_doc.h b/doc/yaca_integrity_doc.h index 4ca565c..7598842 100755 --- a/doc/yaca_integrity_doc.h +++ b/doc/yaca_integrity_doc.h @@ -25,7 +25,7 @@ * \#include * * @section CAPI_YACA_INTEGRITY_MODULE_OVERVIEW Overview - * It provides advanced APIs for creating a signature using asymmetric private key, verifing a signature using asymmetric public key, calculating a HMAC/CMAC of given message using symmetric key and calculating message digests of given message without key. + * It provides advanced APIs for creating a signature using asymmetric private key, verifying a signature using asymmetric public key, calculating a HMAC/CMAC of given message using symmetric key and calculating message digests of given message without key. * */ -- 2.7.4