diff options
author | Dariusz Michaluk <d.michaluk@samsung.com> | 2016-09-23 11:40:43 +0200 |
---|---|---|
committer | Dariusz Michaluk <d.michaluk@samsung.com> | 2016-09-30 10:52:02 +0200 |
commit | 5eedde49c9b2d39c2dc08eb7753738d44b247239 (patch) | |
tree | c6649bd14115fcc714b6f719d5244d9e6184158f | |
parent | abe62ad12fffe2b9c1857b512886a6a57392f387 (diff) | |
download | yaca-5eedde49c9b2d39c2dc08eb7753738d44b247239.tar.gz yaca-5eedde49c9b2d39c2dc08eb7753738d44b247239.tar.bz2 yaca-5eedde49c9b2d39c2dc08eb7753738d44b247239.zip |
Properly address function arguments in documentation
Change-Id: Icb8e9928cf38b88b1697f3c676007a2fa117e354
-rwxr-xr-x | api/yaca/yaca_crypto.h | 22 | ||||
-rwxr-xr-x | api/yaca/yaca_digest.h | 12 | ||||
-rwxr-xr-x | api/yaca/yaca_encrypt.h | 24 | ||||
-rwxr-xr-x | api/yaca/yaca_error.h | 4 | ||||
-rwxr-xr-x | api/yaca/yaca_key.h | 47 | ||||
-rwxr-xr-x | api/yaca/yaca_rsa.h | 38 | ||||
-rwxr-xr-x | api/yaca/yaca_seal.h | 35 | ||||
-rwxr-xr-x | api/yaca/yaca_sign.h | 30 | ||||
-rwxr-xr-x | api/yaca/yaca_simple.h | 48 | ||||
-rwxr-xr-x | api/yaca/yaca_types.h | 8 |
10 files changed, 136 insertions, 132 deletions
diff --git a/api/yaca/yaca_crypto.h b/api/yaca/yaca_crypto.h index 58c421d..e2b2d5a 100755 --- a/api/yaca/yaca_crypto.h +++ b/api/yaca/yaca_crypto.h @@ -73,7 +73,7 @@ void yaca_cleanup(void); * * @since_tizen 3.0 * - * @remarks The @a memory should be freed using yaca_free() + * @remarks The @a memory should be freed using yaca_free(). * * @param[in] size Size of the allocation (bytes) * @param[out] memory Allocated memory @@ -94,7 +94,7 @@ int yaca_malloc(size_t size, void **memory); * * @since_tizen 3.0 * - * @remarks The @a memory should be freed using yaca_free() + * @remarks The @a memory should be freed using yaca_free(). * * @param[in] size Size of the allocation (bytes) * @param[out] memory Allocated memory @@ -121,7 +121,7 @@ int yaca_zalloc(size_t size, void **memory); * * @remarks If the function fails the contents of @a memory will be left unchanged. * - * @remarks The @a memory should be freed using yaca_free() + * @remarks The @a memory should be freed using yaca_free(). * * @param[in] size Size of the new allocation (bytes) * @param[in,out] memory Memory to be reallocated @@ -199,7 +199,7 @@ int yaca_randomize_bytes(char *data, size_t data_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 ctx or property) + * invalid @a ctx or @a property) * @retval #YACA_ERROR_INTERNAL Internal error * * @see #yaca_property_e @@ -216,13 +216,13 @@ int yaca_context_set_property(yaca_context_h ctx, * * @since_tizen 3.0 * - * @remarks The @a value should be freed using yaca_free() + * @remarks The @a value should be freed using yaca_free(). * * @remarks The @a value has to be of type appropriate for given property. See #yaca_property_e * for details on corresponding types. * - * @remarks @a value_len can be NULL if returned @a value is a single object - * (i.e. not an array/buffer) + * @remarks The @a value_len can be NULL if returned @a value is a single object + * (i.e. not an array/buffer). * * @param[in] ctx Previously initialized crypto context * @param[in] property Property to be read @@ -232,7 +232,7 @@ int yaca_context_set_property(yaca_context_h ctx, * @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, - * invalid ctx or property) + * invalid @a ctx or @a property) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -267,7 +267,7 @@ int yaca_context_get_property(const yaca_context_h ctx, * @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, - * invalid context or too big input_len) + * invalid @a ctx or too big @a input_len) * @retval #YACA_ERROR_INTERNAL Internal error */ int yaca_context_get_output_length(const yaca_context_h ctx, @@ -288,8 +288,8 @@ int yaca_context_get_output_length(const yaca_context_h ctx, void yaca_context_destroy(yaca_context_h ctx); /** - * @} - */ + * @} + */ #ifdef __cplusplus } /* extern */ diff --git a/api/yaca/yaca_digest.h b/api/yaca/yaca_digest.h index d9d25cb..8d3bd02 100755 --- a/api/yaca/yaca_digest.h +++ b/api/yaca/yaca_digest.h @@ -41,7 +41,7 @@ extern "C" { * * @since_tizen 3.0 * - * @remarks The @a ctx should be released using yaca_context_destroy() + * @remarks The @a ctx should be released using yaca_context_destroy(). * * @param[out] ctx Newly created context * @param[in] algo Digest algorithm that will be used @@ -49,7 +49,7 @@ extern "C" { * @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, - * invalid algo) + * invalid @a algo) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -72,7 +72,7 @@ int yaca_digest_initialize(yaca_context_h *ctx, yaca_digest_algorithm_e algo); * @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 context) + * invalid @a ctx) * @retval #YACA_ERROR_INTERNAL Internal error * * @see yaca_digest_initialize() @@ -97,7 +97,7 @@ int yaca_digest_update(yaca_context_h ctx, const char *message, size_t message_l * @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, - * invalid context) + * invalid @a ctx) * @retval #YACA_ERROR_INTERNAL Internal error * * @see yaca_digest_initialize() @@ -107,8 +107,8 @@ int yaca_digest_update(yaca_context_h ctx, const char *message, size_t message_l int yaca_digest_finalize(yaca_context_h ctx, char *digest, size_t *digest_len); /** - * @} - */ + * @} + */ #ifdef __cplusplus } /* extern */ diff --git a/api/yaca/yaca_encrypt.h b/api/yaca/yaca_encrypt.h index 72b2236..3395013 100755 --- a/api/yaca/yaca_encrypt.h +++ b/api/yaca/yaca_encrypt.h @@ -42,7 +42,7 @@ extern "C" { * * @since_tizen 3.0 * - * @remarks If returned iv_bit_len equals 0 that means that for this + * @remarks If returned @a iv_bit_len equals 0 that means that for this * specific algorithm and its parameters Initialization Vector is not used. * * @param[in] algo Encryption algorithm @@ -53,7 +53,7 @@ extern "C" { * @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, - * invalid algo, bcm or key_bit_len) + * invalid @a algo, @a bcm or @a key_bit_len) * @retval #YACA_ERROR_INTERNAL Internal error * */ @@ -67,7 +67,7 @@ int yaca_encrypt_get_iv_bit_length(yaca_encrypt_algorithm_e algo, * * @since_tizen 3.0 * - * @remarks The @a ctx should be released using yaca_context_destroy() + * @remarks The @a ctx should be released using yaca_context_destroy(). * * @param[out] ctx Newly created context * @param[in] algo Encryption algorithm that will be used @@ -78,7 +78,7 @@ int yaca_encrypt_get_iv_bit_length(yaca_encrypt_algorithm_e algo, * @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, - * invalid algo, bcm, sym_key or iv) + * invalid @a algo, @a bcm, @a sym_key or @a iv) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -110,7 +110,7 @@ int yaca_encrypt_initialize(yaca_context_h *ctx, * @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 context) + * invalid @a ctx) * @retval #YACA_ERROR_INTERNAL Internal error * * @see yaca_encrypt_initialize() @@ -140,7 +140,7 @@ int yaca_encrypt_update(yaca_context_h ctx, * @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, - * invalid context) + * invalid @a ctx) * @retval #YACA_ERROR_INTERNAL Internal error * * @see yaca_encrypt_initialize() @@ -156,7 +156,7 @@ int yaca_encrypt_finalize(yaca_context_h ctx, * * @since_tizen 3.0 * - * @remarks The @a ctx should be released using yaca_context_destroy() + * @remarks The @a ctx should be released using yaca_context_destroy(). * * @param[out] ctx Newly created context * @param[in] algo Encryption algorithm that was used to encrypt the data @@ -167,7 +167,7 @@ int yaca_encrypt_finalize(yaca_context_h ctx, * @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, - * invalid algo, bcm, sym_key or iv) + * invalid @a algo, @a bcm, @a sym_key or @a iv) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -199,7 +199,7 @@ int yaca_decrypt_initialize(yaca_context_h *ctx, * @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 context), wrong #YACA_PROPERTY_CCM_AAD or + * invalid @a ctx), wrong #YACA_PROPERTY_CCM_AAD or * wrong #YACA_PROPERTY_CCM_TAG was used * @retval #YACA_ERROR_INTERNAL Internal error * @@ -230,7 +230,7 @@ int yaca_decrypt_update(yaca_context_h ctx, * @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, - * invalid context), wrong #YACA_PROPERTY_GCM_AAD or + * invalid @a ctx), wrong #YACA_PROPERTY_GCM_AAD or * wrong #YACA_PROPERTY_GCM_TAG was used * @retval #YACA_ERROR_INTERNAL Internal error * @@ -243,8 +243,8 @@ int yaca_decrypt_finalize(yaca_context_h ctx, size_t *plaintext_len); /** - * @} - */ + * @} + */ #ifdef __cplusplus } /* extern */ diff --git a/api/yaca/yaca_error.h b/api/yaca/yaca_error.h index 03d6a57..f062812 100755 --- a/api/yaca/yaca_error.h +++ b/api/yaca/yaca_error.h @@ -63,8 +63,8 @@ typedef enum { } yaca_error_e; /** - * @} - */ + * @} + */ #ifdef __cplusplus } /* extern */ diff --git a/api/yaca/yaca_key.h b/api/yaca/yaca_key.h index e4783e3..4f50550 100755 --- a/api/yaca/yaca_key.h +++ b/api/yaca/yaca_key.h @@ -64,7 +64,7 @@ int yaca_key_get_type(const yaca_key_h key, yaca_key_type_e *key_type); * * @since_tizen 3.0 * - * @remarks @a key can be any symmetric (including an Initialization Vector) or + * @remarks The @a key can be any symmetric (including an Initialization Vector) or * asymmetric key (including key generation parameters). * * @remarks For Diffie-Helmann @a key_bit_len returns prime length in bits. Values @@ -116,10 +116,10 @@ int yaca_key_get_bit_length(const yaca_key_h key, size_t *key_bit_len); * be returned. For a list of keys and formats that do support encryption * see yaca_key_export() documentation. * - * @remarks The @a key should be released using yaca_key_destroy() + * @remarks The @a key should be released using yaca_key_destroy(). * * @param[in] key_type Type of the key - * @param[in] password null terminated password for the key (can be NULL) + * @param[in] password Null-terminated password for the key (can be NULL) * @param[in] data Blob containing the key * @param[in] data_len Size of the blob * @param[out] key Returned key @@ -130,7 +130,7 @@ int yaca_key_get_bit_length(const yaca_key_h key, size_t *key_bit_len); * 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 + * @retval #YACA_ERROR_INVALID_PASSWORD Invalid @a password given or @a password was required * and none was given * * @see #yaca_key_type_e @@ -191,7 +191,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 @a key_fmt, @a key_file_fmt or @a data_len too big) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -223,7 +223,7 @@ int yaca_key_export(const yaca_key_h key, * where prime_length_in_bits can be any positive number * - EC: a value taken from #yaca_key_bit_length_ec_e * - * @remarks The @a key should be released using yaca_key_destroy() + * @remarks The @a key should be released using yaca_key_destroy(). * * @param[in] key_type Type of the key to be generated * @param[in] key_bit_len Length of the key (in bits) to be generated @@ -231,7 +231,7 @@ 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 @a key_type or + * @retval #YACA_ERROR_INVALID_PARAMETER @a 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 @@ -256,14 +256,14 @@ int yaca_key_generate(yaca_key_type_e key_type, * @remarks This function is used to generate private asymmetric keys * based on pre-generated parameters. * - * @remarks The @a key should be released using yaca_key_destroy() + * @remarks The @a key should be released using yaca_key_destroy(). * * @param[in] params Pre-generated parameters * @param[out] prv_key Newly generated private key * * @return #YACA_ERROR_NONE on success, negative on error * @retval #YACA_ERROR_NONE Successful - * @retval #YACA_ERROR_INVALID_PARAMETER key is NULL or incorrect @a params + * @retval #YACA_ERROR_INVALID_PARAMETER @a prv_key is NULL or incorrect @a params * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -278,7 +278,7 @@ int yaca_key_generate_from_parameters(const yaca_key_h params, yaca_key_h *prv_k * * @since_tizen 3.0 * - * @remarks The @a pub_key should be released using yaca_key_destroy() + * @remarks The @a pub_key should be released using yaca_key_destroy(). * * @param[in] prv_key Private key to extract the public one from * @param[out] pub_key Extracted public key @@ -300,7 +300,7 @@ int yaca_key_extract_public(const yaca_key_h prv_key, yaca_key_h *pub_key); * * @since_tizen 3.0 * - * @remarks The @a params_key should be released using yaca_key_destroy() + * @remarks The @a params should be released using yaca_key_destroy(). * * @param[in] key A key to extract the parameters from * @param[out] params Extracted parameters @@ -325,9 +325,9 @@ int yaca_key_extract_parameters(const yaca_key_h key, yaca_key_h *params); * * @remarks The @a secret should not be used as a symmetric key, * to produce a symmetric key pass the secret to a key derivation function (KDF) - * or a message digest function + * or a message digest function. * - * @remarks The @a secret should be freed with yaca_free() + * @remarks The @a secret should be freed with yaca_free(). * * @param[in] prv_key Our private key * @param[in] pub_key Peer public key @@ -336,7 +336,8 @@ int yaca_key_extract_parameters(const yaca_key_h key, yaca_key_h *params); * * @return #YACA_ERROR_NONE on success, negative on error * @retval #YACA_ERROR_NONE Successful - * @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (invalid key) + * @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values + * (invalid @a prv_key or @a pub_key) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -355,12 +356,12 @@ int yaca_key_derive_dh(const yaca_key_h prv_key, * @since_tizen 3.0 * * @remarks The @a info parameter is ANSI X9.42 OtherInfo or ANSI X9.62 SharedInfo structure, - * more information can be found in ANSI X9.42/62 standard specification + * more information can be found in ANSI X9.42/62 standard specification. * * @remarks The @a key_material or separate parts of it can be used to import a symmetric key - * with yaca_key_import() + * with yaca_key_import(). * - * @remarks The @a key_material should be freed using yaca_free() + * @remarks The @a key_material should be freed using yaca_free(). * * @param[in] kdf Key derivation function * @param[in] algo Digest algorithm that should be used in key derivation @@ -374,7 +375,7 @@ int yaca_key_derive_dh(const yaca_key_h prv_key, * @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 algo or kdf) + * invalid @a algo or @a kdf) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -398,9 +399,9 @@ int yaca_key_derive_kdf(yaca_kdf_e kdf, * * @since_tizen 3.0 * - * @remarks The @a key should be released using yaca_key_destroy() + * @remarks The @a key should be released using yaca_key_destroy(). * - * @param[in] password User password as a NULL-terminated string + * @param[in] password User password as a null-terminated string * @param[in] salt Salt, should be a non-empty string * @param[in] salt_len Length of the salt * @param[in] iterations Number of iterations @@ -411,7 +412,7 @@ int yaca_key_derive_kdf(yaca_kdf_e kdf, * @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 algo or key_bit_len not dividable by 8) + * invalid @a algo or @a key_bit_len not dividable by 8) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -440,8 +441,8 @@ int yaca_key_derive_pbkdf2(const char *password, void yaca_key_destroy(yaca_key_h key); /** - * @} - */ + * @} + */ #ifdef __cplusplus } /* extern */ diff --git a/api/yaca/yaca_rsa.h b/api/yaca/yaca_rsa.h index 621cdff..20b1b4d 100755 --- a/api/yaca/yaca_rsa.h +++ b/api/yaca/yaca_rsa.h @@ -41,14 +41,14 @@ extern "C" { * * @since_tizen 3.0 * - * @remarks The @a ciphertext should be freed using yaca_free() + * @remarks The @a ciphertext should be freed using yaca_free(). * - * @remarks The key used has to be of a #YACA_KEY_TYPE_RSA_PUB type + * @remarks The @a pub_key used has to be of a #YACA_KEY_TYPE_RSA_PUB type. * - * @remarks The maximum length of plaintext depends on the key length and padding method, - * see #yaca_padding_e for details + * @remarks The maximum length of plaintext depends on the key length and padding method. + * See #yaca_padding_e for details. * - * @remarks The @a plaintext can be NULL but then the @a plaintext_len must be 0 + * @remarks The @a plaintext can be NULL but then the @a plaintext_len must be 0. * * @param[in] padding Padding method * @param[in] pub_key Public RSA key (see yaca_key.h for key generation functions) @@ -60,7 +60,7 @@ extern "C" { * @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 padding, pub_key or plaintext_len) + * invalid @a padding, @a pub_key or @a plaintext_len) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -81,9 +81,9 @@ int yaca_rsa_public_encrypt(yaca_padding_e padding, * * @since_tizen 3.0 * - * @remarks The @a plaintext should be freed using yaca_free() + * @remarks The @a plaintext should be freed using yaca_free(). * - * @remarks The key used has to be of a #YACA_KEY_TYPE_RSA_PRIV type + * @remarks The @a prv_key used has to be of a #YACA_KEY_TYPE_RSA_PRIV type. * * @param[in] padding Padding method * @param[in] prv_key Private RSA key matching the public one used to encrypt the data @@ -95,7 +95,7 @@ int yaca_rsa_public_encrypt(yaca_padding_e padding, * @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 padding or prv_key), padding check failed + * invalid @a padding or @a prv_key), padding check failed * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -116,14 +116,14 @@ int yaca_rsa_private_decrypt(yaca_padding_e padding, * * @since_tizen 3.0 * - * @remarks The @a ciphertext should be freed using yaca_free() + * @remarks The @a ciphertext should be freed using yaca_free(). * - * @remarks The key used has to be of a #YACA_KEY_TYPE_RSA_PRIV type + * @remarks The @a prv_key used has to be of a #YACA_KEY_TYPE_RSA_PRIV type. * * @remarks The maximum length of plaintext depends on the key length and padding method, - * see #yaca_padding_e for details + * see #yaca_padding_e for details. * - * @remarks The @a plaintext can be NULL but then the @a plaintext_len must be 0 + * @remarks The @a plaintext can be NULL but then the @a plaintext_len must be 0. * * @param[in] padding Padding method * @param[in] prv_key Private RSA key (see yaca_key.h for key generation functions) @@ -135,7 +135,7 @@ int yaca_rsa_private_decrypt(yaca_padding_e padding, * @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 padding, prv_key or message_len) + * invalid @a padding, @a prv_key or @a plaintext_len) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -156,9 +156,9 @@ int yaca_rsa_private_encrypt(yaca_padding_e padding, * * @since_tizen 3.0 * - * @remarks The @a plaintext should be freed using yaca_free() + * @remarks The @a plaintext should be freed using yaca_free(). * - * @remarks The key used has to be of a #YACA_KEY_TYPE_RSA_PUB type + * @remarks The @a pub_key used has to be of a #YACA_KEY_TYPE_RSA_PUB type. * * @param[in] padding Padding method * @param[in] pub_key Public RSA key matching the private one used to encrypt the data @@ -170,7 +170,7 @@ int yaca_rsa_private_encrypt(yaca_padding_e padding, * @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 padding or pub_key), padding check failed + * invalid @a padding or @a pub_key), padding check failed * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -187,8 +187,8 @@ int yaca_rsa_public_decrypt(yaca_padding_e padding, size_t *plaintext_len); /** - * @} - */ + * @} + */ #ifdef __cplusplus } /* extern */ diff --git a/api/yaca/yaca_seal.h b/api/yaca/yaca_seal.h index c06a8b7..7fab958 100755 --- a/api/yaca/yaca_seal.h +++ b/api/yaca/yaca_seal.h @@ -46,18 +46,18 @@ extern "C" { * symmetric key and Initialization Vector. * * @remarks Generated symmetric key is encrypted with public key, - * so can be ONLY used with yaca_open_initialize(). It can be exported, - * but after import it can be ONLY used with yaca_open_initialize() as well. + * so can be only used with yaca_open_initialize(). It can be exported, + * but after import it can be only used with yaca_open_initialize() as well. * - * @remarks The @a ctx should be released using yaca_context_destroy() + * @remarks The @a ctx should be released using yaca_context_destroy(). * - * @remarks The @a pub_key must be #YACA_KEY_TYPE_RSA_PUB + * @remarks The @a pub_key must be #YACA_KEY_TYPE_RSA_PUB. * - * @remarks The @a sym_key_bit_len must be at least 88 bits shorter than the @a pub_key bit length + * @remarks The @a sym_key_bit_len must be at least 88 bits shorter than the @a pub_key bit length. * - * @remarks The @a sym_key should be released using yaca_key_destroy() + * @remarks The @a sym_key should be released using yaca_key_destroy(). * - * @remarks The @a iv should be released using yaca_key_destroy() + * @remarks The @a iv should be released using yaca_key_destroy(). * * @since_tizen 3.0 * @@ -73,7 +73,7 @@ extern "C" { * @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, - * invalid algo, bcm, sym_key_bit_len or pub_key) + * invalid @a algo, @a bcm, @a sym_key_bit_len or @a pub_key) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -110,7 +110,7 @@ int yaca_seal_initialize(yaca_context_h *ctx, * @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 context) + * invalid @a ctx) * @retval #YACA_ERROR_INTERNAL Internal error * * @see yaca_seal_initialize() @@ -140,7 +140,7 @@ int yaca_seal_update(yaca_context_h ctx, * @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, - * invalid context) + * invalid @a ctx) * @retval #YACA_ERROR_INTERNAL Internal error * * @see yaca_seal_initialize() @@ -156,9 +156,9 @@ int yaca_seal_finalize(yaca_context_h ctx, * * @since_tizen 3.0 * - * @remarks The @a ctx should be released using yaca_context_destroy() + * @remarks The @a ctx should be released using yaca_context_destroy(). * - * @remarks The @a prv_key must be #YACA_KEY_TYPE_RSA_PRIV + * @remarks The @a prv_key must be #YACA_KEY_TYPE_RSA_PRIV. * * @param[out] ctx Newly created context * @param[in] prv_key Private key, part of the pair that was used for the encryption @@ -172,7 +172,8 @@ int yaca_seal_finalize(yaca_context_h ctx, * @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, invalid - * algo, bcm, sym_key_bit_len, prv_key, sym_key or iv) + * @a algo, @a bcm, @a sym_key_bit_len, @a prv_key, + * @a sym_key or @a iv) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -207,7 +208,7 @@ int yaca_open_initialize(yaca_context_h *ctx, * @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 context), wrong #YACA_PROPERTY_CCM_AAD or + * invalid @a ctx), wrong #YACA_PROPERTY_CCM_AAD or * wrong #YACA_PROPERTY_CCM_TAG was used * @retval #YACA_ERROR_INTERNAL Internal error * @@ -238,7 +239,7 @@ int yaca_open_update(yaca_context_h ctx, * @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, - * invalid context), wrong #YACA_PROPERTY_GCM_AAD or + * invalid @a ctx), wrong #YACA_PROPERTY_GCM_AAD or * wrong #YACA_PROPERTY_GCM_TAG was used * @retval #YACA_ERROR_INTERNAL Internal error * @@ -251,8 +252,8 @@ int yaca_open_finalize(yaca_context_h ctx, size_t *plaintext_len); /** - * @} - */ + * @} + */ #ifdef __cplusplus } /* extern */ diff --git a/api/yaca/yaca_sign.h b/api/yaca/yaca_sign.h index c4b0dff..e627262 100755 --- a/api/yaca/yaca_sign.h +++ b/api/yaca/yaca_sign.h @@ -54,7 +54,7 @@ extern "C" { * * @remarks Using of #YACA_DIGEST_MD5 or #YACA_DIGEST_SHA224 with #YACA_PADDING_X931 is prohibited. * - * @remarks The @a ctx should be released using yaca_context_destroy() + * @remarks The @a ctx should be released using yaca_context_destroy(). * * @param[out] ctx Newly created context * @param[in] algo Digest algorithm that will be used @@ -67,7 +67,7 @@ extern "C" { * @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, - * invalid algo or key) + * invalid @a algo or @a prv_key) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -94,7 +94,7 @@ int yaca_sign_initialize(yaca_context_h *ctx, * @remarks For verification, calculate message HMAC and compare with received MAC using * yaca_memcmp(). * - * @remarks The @a ctx should be released using yaca_context_destroy() + * @remarks The @a ctx should be released using yaca_context_destroy(). * * @param[out] ctx Newly created context * @param[in] algo Digest algorithm that will be used @@ -105,7 +105,7 @@ int yaca_sign_initialize(yaca_context_h *ctx, * @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, - * invalid algo or key) + * invalid @a algo or @a sym_key) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -128,7 +128,7 @@ int yaca_sign_initialize_hmac(yaca_context_h *ctx, * @remarks For verification, calculate message CMAC and compare with received MAC using * yaca_memcmp(). * - * @remarks The @a ctx should be released using yaca_context_destroy() + * @remarks The @a ctx should be released using yaca_context_destroy(). * * @param[out] ctx Newly created context * @param[in] algo Encryption algorithm that will be used @@ -139,7 +139,7 @@ int yaca_sign_initialize_hmac(yaca_context_h *ctx, * @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, - * invalid algo or key) + * invalid @a algo or @a sym_key) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -167,7 +167,7 @@ int yaca_sign_initialize_cmac(yaca_context_h *ctx, * @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 context) + * invalid @a ctx) * @retval #YACA_ERROR_INTERNAL Internal error * * @see yaca_sign_initialize() @@ -196,7 +196,7 @@ int yaca_sign_update(yaca_context_h ctx, * @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, - * invalid context) + * invalid @a ctx) * @retval #YACA_ERROR_INTERNAL Internal error * * @see yaca_sign_initialize() @@ -210,7 +210,7 @@ int yaca_sign_finalize(yaca_context_h ctx, size_t *signature_len); /** - * @brief Initializes a signature verification context for asymmetric signatures + * @brief Initializes a signature verification context for asymmetric signatures. * * @since_tizen 3.0 * @@ -218,7 +218,7 @@ int yaca_sign_finalize(yaca_context_h ctx, * changed using yaca_context_set_property() with #YACA_PROPERTY_PADDING. * For verify to succeed it has to be set to the same value it was signed with. * - * @remarks The @a ctx should be released using yaca_context_destroy() + * @remarks The @a ctx should be released using yaca_context_destroy(). * * @param[out] ctx Newly created context * @param[in] algo Digest algorithm that will be used @@ -231,7 +231,7 @@ int yaca_sign_finalize(yaca_context_h ctx, * @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, - * invalid algo or key) + * invalid @a algo or @a pub_key) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -259,7 +259,7 @@ int yaca_verify_initialize(yaca_context_h *ctx, * @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 context) + * invalid @a ctx) * @retval #YACA_ERROR_INTERNAL Internal error * * @see yaca_verify_initialize() @@ -284,7 +284,7 @@ int yaca_verify_update(yaca_context_h ctx, * @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, - * invalid context) + * invalid @a ctx) * @retval #YACA_ERROR_INTERNAL Internal error * @retval #YACA_ERROR_DATA_MISMATCH The verification failed * @@ -297,8 +297,8 @@ int yaca_verify_finalize(yaca_context_h ctx, size_t signature_len); /** - * @} - */ + * @} + */ #ifdef __cplusplus } /* extern */ diff --git a/api/yaca/yaca_simple.h b/api/yaca/yaca_simple.h index 2944f76..b77e9bc 100755 --- a/api/yaca/yaca_simple.h +++ b/api/yaca/yaca_simple.h @@ -52,11 +52,11 @@ extern "C" { * * @since_tizen 3.0 * - * @remarks yaca_simple_encrypt() doesn't support #YACA_BCM_GCM and #YACA_BCM_CCM + * @remarks yaca_simple_encrypt() doesn't support #YACA_BCM_GCM and #YACA_BCM_CCM. * - * @remarks The @a ciphertext should be freed using yaca_free() + * @remarks The @a ciphertext should be freed using yaca_free(). * - * @remarks The @a plaintext can be NULL but then @a plaintext_len must be 0 + * @remarks The @a plaintext can be NULL but then @a plaintext_len must be 0. * * @param[in] algo Encryption algorithm (select #YACA_ENCRYPT_AES if unsure) * @param[in] bcm Chaining mode (select #YACA_BCM_CBC if unsure) @@ -70,7 +70,7 @@ extern "C" { * @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 algo, bcm, sym_key or iv) + * invalid @a algo, @a bcm, @a sym_key or @a iv) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -93,11 +93,11 @@ int yaca_simple_encrypt(yaca_encrypt_algorithm_e algo, * * @since_tizen 3.0 * - * @remarks yaca_simple_decrypt() doesn't support #YACA_BCM_GCM and #YACA_BCM_CCM + * @remarks yaca_simple_decrypt() doesn't support #YACA_BCM_GCM and #YACA_BCM_CCM. * - * @remarks The @a plaintext should be freed using yaca_free() + * @remarks The @a plaintext should be freed using yaca_free(). * - * @remarks The @a ciphertext can be NULL but then @a ciphertext_len must be 0 + * @remarks The @a ciphertext can be NULL but then @a ciphertext_len must be 0. * * @param[in] algo Decryption algorithm that was used to encrypt the data * @param[in] bcm Chaining mode that was used to encrypt the data @@ -111,7 +111,7 @@ int yaca_simple_encrypt(yaca_encrypt_algorithm_e algo, * @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 algo, bcm, sym_key or iv) + * invalid @a algo, @a bcm, @a sym_key or @a iv) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -134,9 +134,9 @@ int yaca_simple_decrypt(yaca_encrypt_algorithm_e algo, * * @since_tizen 3.0 * - * @remarks The @a digest should be freed using yaca_free() + * @remarks The @a digest should be freed using yaca_free(). * - * @remarks The @a message can be NULL but then @a message_len must be 0 + * @remarks The @a message can be NULL but then @a message_len must be 0. * * @param[in] algo Digest algorithm (select #YACA_DIGEST_SHA256 if unsure) * @param[in] message Message from which the digest is to be calculated @@ -147,7 +147,7 @@ int yaca_simple_decrypt(yaca_encrypt_algorithm_e algo, * @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, - * invalid algo) + * invalid @a algo) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -170,9 +170,9 @@ int yaca_simple_calculate_digest(yaca_digest_algorithm_e algo, * * @remarks Using of #YACA_DIGEST_MD5 algorithm for DSA and ECDSA operations is prohibited. * - * @remarks The @a signature should be freed using yaca_free() + * @remarks The @a signature should be freed using yaca_free(). * - * @remarks The @a message can be NULL but then @a message_len must be 0 + * @remarks The @a message can be NULL but then @a message_len must be 0. * * @param[in] algo Digest algorithm that will be used * @param[in] prv_key Private key that will be used, algorithm is @@ -188,7 +188,7 @@ int yaca_simple_calculate_digest(yaca_digest_algorithm_e algo, * @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 algo or key) + * invalid @a algo or @a prv_key) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -209,7 +209,7 @@ int yaca_simple_calculate_signature(yaca_digest_algorithm_e algo, * * @since_tizen 3.0 * - * @remarks The @a message can be NULL but then @a message_len must be 0 + * @remarks The @a message can be NULL but then @a message_len must be 0. * * @param[in] algo Digest algorithm that will be used * @param[in] pub_key Public key that will be used, algorithm is @@ -225,7 +225,7 @@ int yaca_simple_calculate_signature(yaca_digest_algorithm_e algo, * @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 algo or key) + * invalid @a algo or @a pub_key) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @retval #YACA_ERROR_DATA_MISMATCH The verification failed @@ -249,9 +249,9 @@ int yaca_simple_verify_signature(yaca_digest_algorithm_e algo, * @remarks For verification, calculate message HMAC and compare with received MAC using * yaca_memcmp(). * - * @remarks The @a mac should be freed using yaca_free() + * @remarks The @a mac should be freed using yaca_free(). * - * @remarks The @a message can be NULL but then @a message_len must be 0 + * @remarks The @a message can be NULL but then @a message_len must be 0. * * @param[in] algo Digest algorithm that will be used * @param[in] sym_key Key that will be used, supported key types: @@ -265,7 +265,7 @@ int yaca_simple_verify_signature(yaca_digest_algorithm_e algo, * @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 algo or key) + * invalid @a algo or @a sym_key) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -289,9 +289,9 @@ int yaca_simple_calculate_hmac(yaca_digest_algorithm_e algo, * @remarks For verification, calculate message CMAC and compare with received MAC using * yaca_memcmp(). * - * @remarks The @a mac should be freed using yaca_free() + * @remarks The @a mac should be freed using yaca_free(). * - * @remarks The @a message can be NULL but then @a message_len must be 0 + * @remarks The @a message can be NULL but then @a message_len must be 0. * * @param[in] algo Encryption algorithm that will be used * @param[in] sym_key Key that will be used, supported key types: @@ -305,7 +305,7 @@ int yaca_simple_calculate_hmac(yaca_digest_algorithm_e algo, * @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 algo or key) + * invalid @a algo or @a sym_key) * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error * @retval #YACA_ERROR_INTERNAL Internal error * @@ -322,8 +322,8 @@ int yaca_simple_calculate_cmac(yaca_encrypt_algorithm_e algo, size_t *mac_len); /** - * @} - */ + * @} + */ #ifdef __cplusplus } /* extern */ diff --git a/api/yaca/yaca_types.h b/api/yaca/yaca_types.h index 59674bc..c6b1cb3 100755 --- a/api/yaca/yaca_types.h +++ b/api/yaca/yaca_types.h @@ -683,7 +683,9 @@ typedef enum { */ YACA_PADDING_PKCS1_SSLV23, - /** PKCS #7 padding. Suitable for symmetric encrypt/decrypt operation. */ + /** + * PKCS #7 padding. Suitable for symmetric encrypt/decrypt operation. + */ YACA_PADDING_PKCS7 } yaca_padding_e; @@ -707,8 +709,8 @@ typedef enum { } yaca_kdf_e; /** - * @} - */ + * @} + */ #ifdef __cplusplus } /* extern */ |