Reorganize API order in header files. 37/83537/3
authorDariusz Michaluk <d.michaluk@samsung.com>
Thu, 11 Aug 2016 12:21:41 +0000 (14:21 +0200)
committerDariusz Michaluk <d.michaluk@samsung.com>
Tue, 16 Aug 2016 08:19:53 +0000 (10:19 +0200)
Change-Id: I07bc47cfc3b08e157fe9200e2815957aec14713a

api/yaca/yaca_crypto.h
api/yaca/yaca_key.h
api/yaca/yaca_simple.h

index 5806789..dfdbb8a 100755 (executable)
@@ -245,19 +245,6 @@ int yaca_context_get_property(const yaca_context_h ctx,
                               size_t *value_len);
 
 /**
- * @brief  Destroys the crypto context. Must be called on all contexts that are
- *         no longer used. Passing #YACA_CONTEXT_NULL is allowed.
- *
- * @since_tizen 3.0
- *
- * @param[in,out] ctx  Crypto context
- *
- * @see #yaca_context_h
- *
- */
-void yaca_context_destroy(yaca_context_h ctx);
-
-/**
  * @brief  Returns the minimum required size of the output buffer for a single crypto function call.
  *
  * @since_tizen 3.0
@@ -287,6 +274,19 @@ int yaca_context_get_output_length(const yaca_context_h ctx,
                                    size_t *output_len);
 
 /**
+ * @brief  Destroys the crypto context. Must be called on all contexts that are
+ *         no longer used. Passing #YACA_CONTEXT_NULL is allowed.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in,out] ctx  Crypto context
+ *
+ * @see #yaca_context_h
+ *
+ */
+void yaca_context_destroy(yaca_context_h ctx);
+
+/**
   * @}
   */
 
index b9bf0b1..87e3b30 100755 (executable)
@@ -318,19 +318,6 @@ int yaca_key_extract_public(const yaca_key_h prv_key, yaca_key_h *pub_key);
 int yaca_key_extract_parameters(const yaca_key_h key, yaca_key_h *params);
 
 /**
- * @brief  Release the key created by the library. Passing YACA_KEY_NULL is allowed.
- *
- * @since_tizen 3.0
- *
- * @param[in,out] key  Key to be released
- *
- * @see yaca_key_import()
- * @see yaca_key_export()
- * @see yaca_key_generate()
- */
-void yaca_key_destroy(yaca_key_h key);
-
-/**
  * @brief  Derives a shared secret using Diffie-Helmann or EC Diffie-Helmann key exchange protocol.
  *
  * @since_tizen 3.0
@@ -437,6 +424,19 @@ int yaca_key_derive_pbkdf2(const char *password,
                            yaca_key_h *key);
 
 /**
+ * @brief  Release the key created by the library. Passing YACA_KEY_NULL is allowed.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in,out] key  Key to be released
+ *
+ * @see yaca_key_import()
+ * @see yaca_key_export()
+ * @see yaca_key_generate()
+ */
+void yaca_key_destroy(yaca_key_h key);
+
+/**
   * @}
   */
 
index e39e347..487c53d 100755 (executable)
@@ -46,35 +46,6 @@ extern "C" {
  */
 
 /**
- * @brief  Calculates a digest of a buffer.
- *
- * @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. Can be 0.
- * @param[out] digest      Message digest, will be allocated by the library
- * @param[out] digest_len  Length of message digest (depends on algorithm)
- *
- * @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)
- * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error
- * @retval #YACA_ERROR_INTERNAL Internal error
- *
- * @see #yaca_digest_algorithm_e
- * @see yaca_free()
- */
-int yaca_simple_calculate_digest(yaca_digest_algorithm_e algo,
-                                 const char *data,
-                                 size_t data_len,
-                                 char **digest,
-                                 size_t *digest_len);
-
-/**
  * @brief  Encrypts data using a symmetric cipher.
  *
  * @since_tizen 3.0
@@ -149,6 +120,35 @@ int yaca_simple_decrypt(yaca_encrypt_algorithm_e algo,
                         size_t *plaintext_len);
 
 /**
+ * @brief  Calculates a digest of a buffer.
+ *
+ * @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. Can be 0.
+ * @param[out] digest      Message digest, will be allocated by the library
+ * @param[out] digest_len  Length of message digest (depends on algorithm)
+ *
+ * @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)
+ * @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error
+ * @retval #YACA_ERROR_INTERNAL Internal error
+ *
+ * @see #yaca_digest_algorithm_e
+ * @see yaca_free()
+ */
+int yaca_simple_calculate_digest(yaca_digest_algorithm_e algo,
+                                 const char *data,
+                                 size_t data_len,
+                                 char **digest,
+                                 size_t *digest_len);
+
+/**
  * @brief  Creates a signature using asymmetric private key.
  *
  * @since_tizen 3.0