ACR: Cleanup TODO's and descriptions in API headers. 58/73558/4
authorDariusz Michaluk <d.michaluk@samsung.com>
Wed, 8 Jun 2016 12:50:16 +0000 (14:50 +0200)
committerDariusz Michaluk <d.michaluk@samsung.com>
Thu, 9 Jun 2016 13:46:52 +0000 (15:46 +0200)
Change-Id: I48fd3df7fa2a530dab80a7037e4a4d6087b7e949

api/yaca/yaca_crypto.h
api/yaca/yaca_digest.h
api/yaca/yaca_encrypt.h
api/yaca/yaca_key.h
api/yaca/yaca_seal.h
api/yaca/yaca_sign.h
api/yaca/yaca_simple.h
api/yaca/yaca_types.h
todo.txt

index 652913c..e93d0f1 100644 (file)
@@ -34,7 +34,6 @@ extern "C" {
 /**
  * @defgroup  Non-Crypto  Yet Another Crypto API - non crypto related functions.
  *
- * TODO: extended description and examples.
  *
  * @{
  */
index 4c72af5..622928b 100644 (file)
@@ -34,7 +34,6 @@ extern "C" {
 /**
  * @defgroup  Advanced-Digest  Advanced API for the message digests.
  *
- * TODO: extended description and examples.
  *
  * @{
  */
index ab50c39..c87d048 100644 (file)
@@ -34,7 +34,6 @@ extern "C" {
 /**
  * @defgroup  Advanced-Encryption-Symmetric  Advanced API for the symmetric encryption.
  *
- * TODO: extended description and examples.
  *
  * @{
  */
@@ -44,8 +43,8 @@ extern "C" {
  *
  * @since_tizen 3.0
  *
- * @remarks If returned iv_bits equals 0 that means that for this
- *          specific algorithm and its parameters IV is not used.
+ * @remarks  If returned iv_bit_len equals 0 that means that for this
+ *           specific algorithm and its parameters IV is not used.
  *
  * @param[in]  algo         Encryption algorithm
  * @param[in]  bcm          Chain mode
index 3dad4f4..5f0aa1b 100644 (file)
@@ -34,7 +34,6 @@ extern "C" {
 /**
  * @defgroup  Key  Advanced API for the key and IV handling.
  *
- * TODO: extended description and examples.
  *
  * @{
  */
@@ -80,21 +79,21 @@ 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.
- *          It should autodetect both the key format and the file format.
+ * @remarks  This function imports a key trying to match it to the 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
- *          binary format are supported.
- *          For asymmetric keys PEM and DER file formats are supported.
+ * @remarks  For symmetric, IV and DES keys RAW binary format and BASE64 encoded
+ *           binary format are supported.
+ *           For asymmetric keys PEM and DER file formats are supported.
  *
- * @remarks Asymmetric keys can be in PKCS#1 or SSleay key formats (for RSA and
- *          DSA respectively). Asymmetric private keys can also be in PKCS#8
- *          format. Additionally it is possible to import public RSA key from
- *          X509 certificate.
+ * @remarks  Asymmetric keys can be in PKCS#1 or SSleay key formats (for RSA and
+ *           DSA respectively). Asymmetric private keys can also be in PKCS#8
+ *           format. Additionally it is possible to import public RSA key from
+ *           X509 certificate.
  *
- * @remarks If the key is encrypted the algorithm will be autodetected and password
- *          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  If the key is encrypted the algorithm will be autodetected and password
+ *           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.
  *
  * @param[in]  key_type  Type of the key
  * @param[in]  password  null terminated password for the key (can be NULL)
@@ -178,11 +177,11 @@ int yaca_key_export(const yaca_key_h key,
  *
  * @since_tizen 3.0
  *
- * @remarks This function is used to generate symmetric and private asymmetric keys.
+ * @remarks  This function is used to generate symmetric and private asymmetric keys.
  *
- *          Supported key lengths:
- *          - RSA: length >= 256bits
- *          - DSA: length >= 512bits, multiple of 64
+ * @remarks  Supported key lengths:
+ *           - RSA: length >= 256bits
+ *           - DSA: length >= 512bits, multiple of 64
  *
  * @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
@@ -244,7 +243,6 @@ int yaca_key_destroy(yaca_key_h key);
 /**
  * @defgroup  Key-Derivation  Advanced API for the key derivation.
  *
- * TODO: extended description and examples.
  *
  * @{
  */
index 784a494..d79fb8f 100644 (file)
@@ -34,11 +34,10 @@ extern "C" {
 /**
  * @defgroup  Advanced-Encryption-Asymmetric  Advanced API for the asymmetric encryption.
  *
- * TODO: extended description and examples.
  *
- * @remarks Seal does more than just encrypt. It first generates the encryption key and IV,
- *          then encrypts whole message using this key (and selected symmetric algorithm).
- *          Finally it encrypts symmetric key with public key.
+ * @remarks  Seal does more than just encrypt. It first generates the encryption key and IV,
+ *           then encrypts whole message using this key (and selected symmetric algorithm).
+ *           Finally it encrypts symmetric key with public key.
  *
  * @{
  */
index 1b91fd0..2d9206f 100644 (file)
@@ -34,8 +34,6 @@ extern "C" {
 /**
  * @defgroup  Advanced-Integrity  Advanced API for the integrity handling - HMAC, CMAC and digital signature.
  *
- * TODO: extended description and examples.
- * TODO: add documentation how to set padding etc
  *
  * @{
  */
@@ -45,8 +43,8 @@ extern "C" {
  *
  * @since_tizen 3.0
  *
- * @remarks For verification use yaca_verify_initialize(), yaca_verify_update() and
- *          yaca_verify_finalize() functions with matching public key.
+ * @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())
  * @param[in]  algo  Digest algorithm that will be used
@@ -80,8 +78,8 @@ int yaca_sign_initialize(yaca_context_h *ctx,
  *
  * @since_tizen 3.0
  *
- * @remarks For verification, calculate message HMAC and compare with received MAC using
- *          yaca_memcmp().
+ * @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())
  * @param[in]  algo  Digest algorithm that will be used
@@ -112,8 +110,8 @@ int yaca_sign_initialize_hmac(yaca_context_h *ctx,
  *
  * @since_tizen 3.0
  *
- * @remarks For verification, calculate message CMAC and compare with received MAC using
- *          yaca_memcmp().
+ * @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())
  * @param[in]  algo  Encryption algorithm that will be used
index b1854c6..5dd2b13 100644 (file)
@@ -34,15 +34,13 @@ extern "C" {
 /**
  * @defgroup  Simple-API  Simple API.
  *
- *  @remarks This is simple API.
- *           Design constraints:
- *           - All operations are single-shot (no streaming possible)
- *           - Context is not used
- *           - For now only digest and symmetric ciphers are supported
- *           - GCM and CCM chaining is not supported
- *           - All outputs are allocated by the library
- *
- * TODO: extended description and examples.
+ *  @remarks  This is simple API.
+ *            Design constraints:
+ *            - All operations are single-shot (no streaming possible)
+ *            - Context is not used
+ *            - For now only digest and symmetric ciphers are supported
+ *            - GCM and CCM chaining is not supported
+ *            - All outputs are allocated by the library
  *
  * @{
  */
@@ -221,8 +219,8 @@ int yaca_simple_verify_signature(yaca_digest_algorithm_e algo,
  *
  * @since_tizen 3.0
  *
- * @remarks For verification, calculate message HMAC and compare with received MAC using
- *          yaca_memcmp().
+ * @remarks  For verification, calculate message HMAC and compare with received MAC using
+ *           yaca_memcmp().
  *
  * @param[in]  algo      Digest algorithm that will be used
  * @param[in]  key       Key that will be used, supported key types:
@@ -258,8 +256,8 @@ int yaca_simple_calculate_hmac(yaca_digest_algorithm_e algo,
  *
  * @since_tizen 3.0
  *
- * @remarks For verification, calculate message CMAC and compare with received MAC using
- *          yaca_memcmp().
+ * @remarks  For verification, calculate message CMAC and compare with received MAC using
+ *           yaca_memcmp().
  *
  * @param[in]  algo      Encryption algorithm that will be used
  * @param[in]  key       Key that will be used, supported key types:
index 96d23c8..4b35953 100644 (file)
@@ -31,7 +31,6 @@ extern "C" {
 /**
  * @defgroup Crypto-Types Yet Another Crypto API - types.
  *
- * TODO: extended description.
  *
  * @{
  */
@@ -167,7 +166,7 @@ typedef enum {
         * #YACA_BCM_GCM,
         * #YACA_BCM_CCM,
         * #YACA_BCM_CTR
-        * - see #yaca_block_cipher_mode_e for details on additional parameters (mandatory).
+        * - see #yaca_block_cipher_mode_e for details on additional properties (mandatory).
         */
        YACA_ENCRYPT_AES = 0,
 
@@ -181,7 +180,7 @@ typedef enum {
         * #YACA_BCM_CFB1,
         * #YACA_BCM_CFB8,
         * #YACA_BCM_ECB
-        * - see #yaca_block_cipher_mode_e for details on additional parameters (mandatory).
+        * - see #yaca_block_cipher_mode_e for details on additional properties (mandatory).
         */
        YACA_ENCRYPT_UNSAFE_DES,
 
@@ -193,7 +192,7 @@ typedef enum {
         * #YACA_BCM_OFB,
         * #YACA_BCM_CFB,
         * #YACA_BCM_ECB
-        * - see #yaca_block_cipher_mode_e for details on additional parameters (mandatory).
+        * - see #yaca_block_cipher_mode_e for details on additional properties (mandatory).
         * - Use double DES keys to perform corresponding 2-key 3DES encryption.
 
         */
@@ -209,7 +208,7 @@ typedef enum {
         * #YACA_BCM_CFB1,
         * #YACA_BCM_CFB8,
         * #YACA_BCM_ECB
-        * - see #yaca_block_cipher_mode_e for details on additional parameters (mandatory).
+        * - see #yaca_block_cipher_mode_e for details on additional properties (mandatory).
         * - Use triple DES keys to perform corresponding 3-key 3DES encryption.
         */
        YACA_ENCRYPT_3DES_3TDEA,
@@ -218,7 +217,7 @@ typedef enum {
         * RC2 encryption.
         * This is a variable key length cipher.
         * - Supported key lengths: 8-1024 bits in steps of 8 bits.
-        * - Effective key bits parameter by default equals to 128.
+        * - Effective key bits property by default equals to 128.
         * - Supported block cipher modes:
         * #YACA_BCM_CBC,
         * #YACA_BCM_OFB,
@@ -244,7 +243,7 @@ typedef enum {
         * #YACA_BCM_OFB,
         * #YACA_BCM_CFB,
         * #YACA_BCM_ECB
-        * - see #yaca_block_cipher_mode_e for details on additional parameters (mandatory).
+        * - see #yaca_block_cipher_mode_e for details on additional properties (mandatory).
         */
        YACA_ENCRYPT_CAST5,
 } yaca_encrypt_algorithm_e;
@@ -282,7 +281,7 @@ typedef enum {
         * GCM block cipher mode.
         * This is a variable IV length mode (recommended 96 bits IV).
         *
-        * Supported parameters:
+        * Supported properties:
         * - #YACA_PROPERTY_GCM_TAG_LEN = GCM tag length\n
         *   Supported tag lengths: @c 32, @c 64, @c 96, @c 104, @c 112, @c 120, @c 128,
         *   (recommended 128 bits tag).\n
@@ -332,7 +331,7 @@ typedef enum {
         * This is a variable IV length mode.\n
         * Supported IV lengths: 56-104 bits in steps of 8 bits (recommended 56 bits IV).\n\n
         *
-        * Supported parameters:
+        * Supported properties:
         * - #YACA_PROPERTY_CCM_TAG_LEN = CCM tag length\n
         *   Supported tag lengths: 32-128 bits in step of 16 bits (recommended 96 bits tag).\n
         *   Set after yaca_encrypt_initialize() and before yaca_encrypt_update()
index 26e6208..e2ef626 100644 (file)
--- a/todo.txt
+++ b/todo.txt
@@ -7,3 +7,4 @@ Global:
 - yaca_key_wrap(), yaca_key_unwrap()
 - We need a way to import keys encrypted with hw (or other) keys. New
   function like yaca_key_load or sth?
+- Add extended description and examples in documentation.
\ No newline at end of file