*
* @since_tizen 3.0
*
+ * @remarks The @a memory should be freed using yaca_free()
+ *
* @param[in] size Size of the allocation (bytes)
* @param[out] memory Allocated memory
*
*
* @since_tizen 3.0
*
+ * @remarks The @a memory should be freed using yaca_free()
+ *
* @param[in] size Size of the allocation (bytes)
* @param[out] memory Allocated memory
*
*
* @since_tizen 3.0
*
- * @remarks In case of failure the function doesn't free the memory pointed by @b memory.
+ * @remarks In case of failure the function doesn't free the memory pointed by @a memory.
*
- * @remarks If @b *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 @b memory will be left unchanged.
+ * @remarks If the function fails the contents of @a memory will be left unchanged.
+ *
+ * @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
int yaca_free(void *memory);
/**
- * @brief Safely compares first @b len bytes of two buffers.
+ * @brief Safely compares first @a len bytes of two buffers.
*
* @since_tizen 3.0
*
*
* @since_tizen 3.0
*
+ * @remarks The @a value should be freed using yaca_free()
+ *
* @param[in] ctx Previously initialized crypto context
* @param[in] property Property to be read
- * @param[out] value Copy of the property value (must be freed with yaca_free())
+ * @param[out] value Copy of the property value
* @param[out] value_len Length of the property value will be returned here
*
* @return #YACA_ERROR_NONE on success, negative on error
*
* @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 @b input_len has to be set to 0.
+ * 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
*
* @since_tizen 3.0
*
- * @param[out] ctx Newly created context (must be freed with 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
*
* @return #YACA_ERROR_NONE on success, negative on error
*
* @since_tizen 3.0
*
- * @param[out] ctx Newly created context (must be freed with 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
* @param[in] bcm Chaining mode that will be used
* @param[in] sym_key Symmetric key that will be used
*
* @since_tizen 3.0
*
- * @param[out] ctx Newly created context (must be freed with 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
* @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
* used. If it's not known if the key is encrypted one should pass NULL as
* password and check for the #YACA_ERROR_INVALID_PASSWORD return code.
*
+ * @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] data Blob containing the key
* @param[in] data_len Size of the blob
- * @param[out] key Returned key (must be freed with yaca_key_destroy())
+ * @param[out] key Returned key
*
* @return #YACA_ERROR_NONE on success, negative on error
* @retval #YACA_ERROR_NONE Successful
* - RSA: length >= 256bits
* - DSA: length >= 512bits, multiple of 64
*
+ * @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
- * @param[out] key Newly generated key (must be freed with yaca_key_destroy())
+ * @param[out] key Newly generated key
*
* @return #YACA_ERROR_NONE on success, negative on error
* @retval #YACA_ERROR_NONE Successful
*
* @since_tizen 3.0
*
+ * @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 (must be freed with yaca_key_destroy())
+ * @param[out] pub_key Extracted public key
*
* @return #YACA_ERROR_NONE on success, negative on error
* @retval #YACA_ERROR_NONE Successful
*
* @since_tizen 3.0
*
+ * @remarks The @a key should be released using yaca_key_destroy()
+ *
* @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
* @param[in] algo Digest algorithm that should be used in key generation
* @param[in] key_bit_len Length of a key (in bits) to be generated
- * @param[out] key Newly generated key (must be freed with yaca_key_destroy())
+ * @param[out] key Newly generated key
*
* @return #YACA_ERROR_NONE on success, negative on error
* @retval #YACA_ERROR_NONE Successful
* 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 sym_key should be released using yaca_key_destroy()
+ *
+ * @remarks The @a iv should be released using yaca_key_destroy()
+ *
* @since_tizen 3.0
*
- * @param[out] ctx Newly created context (must be freed with yaca_context_destroy())
+ * @param[out] ctx Newly created context
* @param[in] pub_key Public key of the peer that will receive the encrypted data
* @param[in] algo Symmetric algorithm that will be used
* @param[in] bcm Block chaining mode for the symmetric algorithm
* @param[in] sym_key_bit_len Symmetric key length (in bits) that will be generated
* @param[out] sym_key Generated symmetric key that will be used,
* it is encrypted with peer's public key
- * (must be freed with yaca_key_destroy())
* @param[out] iv Generated initialization vector that will be used
- * (must be freed with yaca_key_destroy())
*
* @return #YACA_ERROR_NONE on success, negative on error
* @retval #YACA_ERROR_NONE Successful
*
* @since_tizen 3.0
*
- * @param[out] ctx Newly created context (must be freed by yaca_context_destroy())
+ * @remarks The @a ctx should be released using yaca_context_destroy()
+ *
+ * @param[out] ctx Newly created context
* @param[in] prv_key Private key, part of the pair that was used for the encryption
* @param[in] algo Symmetric algorithm that was used for the encryption
* @param[in] bcm Block chaining mode for the symmetric algorithm
* @remarks For verification use yaca_verify_initialize(), yaca_verify_update() and
* yaca_verify_finalize() functions with matching public key.
*
- * @param[out] ctx Newly created context (must be freed with 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
* @param[in] key Private key that will be used, algorithm is deduced based
* on key type, supported key types:
* @remarks For verification, calculate message HMAC and compare with received MAC using
* yaca_memcmp().
*
- * @param[out] ctx Newly created context (must be freed with 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
* @param[in] key Symmetric key that will be used, supported key types:
* - #YACA_KEY_TYPE_SYMMETRIC,
* @remarks For verification, calculate message CMAC and compare with received MAC using
* yaca_memcmp().
*
- * @param[out] ctx Newly created context (must be freed with 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
* @param[in] key Symmetric key that will be used, supported key types:
* - #YACA_KEY_TYPE_SYMMETRIC,
*
* @since_tizen 3.0
*
- * @param[out] ctx Newly created context (must be freed with 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
* @param[in] key Public key that will be used, algorithm is deduced based on
* key type, supported key types:
*
* @since_tizen 3.0
*
+ * @remarks The @a digest should be freed using yaca_free()
+ *
* @param[in] algo Digest algorithm (select #YACA_DIGEST_SHA256 if unsure)
* @param[in] data Data from which the digest is to be calculated
* @param[in] data_len Length of the data
* @param[out] digest Message digest, will be allocated by the library
- * (should be freed with yaca_free())
* @param[out] digest_len Length of message digest (depends on algorithm)
*
* @return #YACA_ERROR_NONE on success, negative on error
*
* @since_tizen 3.0
*
+ * @remarks The @a ciphertext should be freed using yaca_free()
+ *
* @param[in] algo Encryption algorithm (select #YACA_ENCRYPT_AES if unsure)
* @param[in] bcm Chaining mode (select #YACA_BCM_CBC if unsure)
* @param[in] sym_key Symmetric encryption key (see key.h for key generation functions)
* @param[in] plaintext Plaintext to be encrypted
* @param[in] plaintext_len Length of the plaintext
* @param[out] ciphertext Encrypted data, will be allocated by the library
- * (should be freed with yaca_free())
* @param[out] ciphertext_len Length of the encrypted data (may be larger than decrypted)
*
* @return #YACA_ERROR_NONE on success, negative on error
*
* @since_tizen 3.0
*
+ * @remarks The @a plaintext should be freed using yaca_free()
+ *
* @param[in] algo Decryption 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 encryption key that was used to encrypt the data
* @param[in] ciphertext Ciphertext to be decrypted
* @param[in] ciphertext_len Length of ciphertext
* @param[out] plaintext Decrypted data, will be allocated by the library
- * (should be freed with yaca_free())
* @param[out] plaintext_len Length of the decrypted data
*
* @return #YACA_ERROR_NONE on success, negative on error
*
* @since_tizen 3.0
*
+ * @remarks The @a signature should be freed using yaca_free()
+ *
* @param[in] algo Digest algorithm that will be used
* @param[in] key Private key that will be used, algorithm is
* deduced based on key type, supported key types:
* @param[in] data Data to be signed
* @param[in] data_len Length of the data
* @param[out] signature Message signature, will be allocated by the
- * library (should be freed with yaca_free())
* @param[out] signature_len Length of the signature
*
* @return #YACA_ERROR_NONE on success, negative on error
* @remarks For verification, calculate message HMAC and compare with received MAC using
* yaca_memcmp().
*
+ * @remarks The @a mac should be freed using yaca_free()
+ *
* @param[in] algo Digest algorithm that will be used
* @param[in] key Key that will be used, supported key types:
* - #YACA_KEY_TYPE_SYMMETRIC,
* @param[in] data Data to calculate HMAC from
* @param[in] data_len Length of the data
* @param[out] mac MAC, will be allocated by the library
- * (should be freed with yaca_free())
* @param[out] mac_len Length of the MAC
*
* @return #YACA_ERROR_NONE on success, negative on error
* @remarks For verification, calculate message CMAC and compare with received MAC using
* yaca_memcmp().
*
+ * @remarks The @a mac should be freed using yaca_free()
+ *
* @param[in] algo Encryption algorithm that will be used
* @param[in] key Key that will be used, supported key types:
* - #YACA_KEY_TYPE_SYMMETRIC,
* @param[in] data Data to calculate CMAC from
* @param[in] data_len Length of the data
* @param[out] mac MAC, will be allocated by the library
- * (should be freed with yaca_free())
* @param[out] mac_len Length of the MAC
*
* @return #YACA_ERROR_NONE on success, negative on error