X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=inc%2FFSecCryptoAesCipher.h;h=1b942892f4b14a546bd4e35056bb89fa6a16217e;hb=fdf5072507c9670d32f378f0a7dbd24ab7bd6b49;hp=7f762b4aab02c6edfe35c1d7b4bc7ae996b781f8;hpb=27f1388665067f69d5eb64e0cae6bb5f4250beec;p=platform%2Fframework%2Fnative%2Fappfw.git
diff --git a/inc/FSecCryptoAesCipher.h b/inc/FSecCryptoAesCipher.h
index 7f762b4..1b94289 100644
--- a/inc/FSecCryptoAesCipher.h
+++ b/inc/FSecCryptoAesCipher.h
@@ -36,12 +36,13 @@ class _SymmetricCipher;
* @class AesCipher
* @brief This class provides methods for encryption and decryption using the Advanced Encryption Standard (AES) method.
*
- * @since 2.0
+ * @since 2.0
*
* The %AesCipher class provides a symmetric cipher using the Advanced Encryption Standard (AES) method.
- * Set appropriate values for the requested mode/key bit/padding scheme and cipher operation mode (CIPHER_ENCRYPT, CIPHER_DECRYPT, CIPHER_WRAP, or CIPHER_UNWRAP) parameters. @n
+ * This class allows to set appropriate values for the requested mode/key bit/padding scheme and cipher operation mode (::CIPHER_ENCRYPT, ::CIPHER_DECRYPT,
+ * ::CIPHER_WRAP, or ::CIPHER_UNWRAP) parameters. @n
*
- * For more information on the class features, see Ciphers.
+ * For more information on the class features, see Ciphers.
*
* @see ISymmetricCipher
* @see DesCipher
@@ -54,8 +55,8 @@ class _OSP_EXPORT_ AesCipher
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, @n
- * the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
@@ -74,20 +75,23 @@ public:
* @since 2.0
*
* @return An error code
- * @param[in] transformation The name of the requested mode/key bit/padding scheme @n
+ * @param[in] transformation The requested mode/key bit/padding scheme @n
* For example, "CBC/128/NOPADDING" or "CBC/192/NOPADDING".
* @param[in] opMode The cipher operation mode @n
* For example, @c CIPHER_ENCRYPT, @c CIPHER_DECRYPT, @c CIPHER_WRAP, or @c CIPHER_UNWRAP.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or the specified @c opMode does not contain a valid value for the cipher operation.
- * @remarks If @c opMode is not matching the actual operation, the result of the operation is @c null and an exception is returned. @n
- * For example, if @c opMode is set to @c CIPHER_ENCRYPT, @c CIPHER_WRAP, or @c CIPHER_UNWRAP and the DecryptN() method is used, then the result obtained is @c null and an exception is returned.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - The specified @c opMode does not contain a valid value for the cipher operation.
+ * @remarks If @c opMode is not matching the actual operation, the result of the operation is @c null and an exception is returned. @n
+ * For example, if @c opMode is set to @c CIPHER_ENCRYPT, @c CIPHER_WRAP, or @c CIPHER_UNWRAP and the DecryptN()
+ * method is used, then the result obtained is @c null and an exception is returned.
*/
virtual result Construct(const Tizen::Base::String& transformation, enum CipherOperation opMode);
/**
- * Sets a symmetric key for encryption or decryption.
+ * Sets the symmetric key for encryption or decryption.
*
* @since 2.0
*
@@ -100,7 +104,7 @@ public:
virtual result SetKey(const Tizen::Security::ISecretKey& key);
/**
- * Sets the initial vector.
+ * Sets the specified initial vector.
*
* @since 2.0
*
@@ -113,24 +117,25 @@ public:
virtual result SetInitialVector(const Tizen::Base::ByteBuffer& initialVector);
/**
- * Encrypts the data (single-part).
+ * Encrypts the specified data (single-part).
*
* @since 2.0
+ * @pre Before calling this method, set a secret key and an initial vector using SetKey() and SetInitialVector().
*
* @return A pointer to the Tizen::Base::ByteBuffer class that contains the output, @n
* else @c null if an error occurs
- * @param[in] input An instance of Tizen::Base::ByteBuffer
+ * @param[in] input An instance of Tizen::Base::ByteBuffer
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified instance of Tizen::Base::ByteBuffer is invalid or empty.
+ * @exception E_INVALID_ARG The specified Tizen::Base::ByteBuffer instance is invalid or empty.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_KEY_NOT_FOUND The specified key is not found.
* @exception E_INVALID_OPERATION The specified cipher operation mode for this method is invalid.
* @exception E_OVERFLOW This operation has caused the memory to overflow.
- * @exception E_SYSTEM A system error has occurred. @n
- * The method has failed to operate with the openssl library, or
- * the Tizen::Base::ByteBuffer operation has failed.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks A secret key and an initial vector are set before calling this method.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - The method has failed to operate with the openssl library.
+ * - The Tizen::Base::ByteBuffer operation has failed.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
*/
virtual Tizen::Base::ByteBuffer* EncryptN(const Tizen::Base::ByteBuffer& input);
@@ -138,26 +143,26 @@ public:
* Decrypts the data (single-part).
*
* @since 2.0
- *
+ * @pre Before calling this method, set a secret key and an initial vector using SetKey() and SetInitialVector().
* @return A pointer to the Tizen::Base::ByteBuffer class that contains the output, @n
* else @c null if an error occurs
* @param[in] input An instance of Tizen::Base::ByteBuffer
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified instance of Tizen::Base::ByteBuffer is invalid or empty.
+ * @exception E_INVALID_ARG The specified Tizen::Base::ByteBuffer instance is invalid or empty.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_KEY_NOT_FOUND The specified key is not found.
* @exception E_INVALID_OPERATION The specified cipher operation mode for this method is invalid.
* @exception E_OVERFLOW This operation has caused the memory to overflow.
- * @exception E_SYSTEM A system error has occurred. @n
- * The method has failed to operate with the openssl library, or
- * the Tizen::Base::ByteBuffer operation has failed.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - The method has failed to operate with the openssl library.
+ * - The Tizen::Base::ByteBuffer operation has failed.
* @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks A secret key and an initial vector are set before calling this method.
*/
virtual Tizen::Base::ByteBuffer* DecryptN(const Tizen::Base::ByteBuffer& input);
/**
- * Initializes a multiple-part encryption or decryption operation.
+ * Initializes the instance of %AesCipher for the multiple-part encryption or decryption.
*
* @since 2.0
*
@@ -166,13 +171,14 @@ public:
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_KEY_NOT_FOUND The specified key is not found.
* @exception E_INVALID_OPERATION The specified cipher operation mode for this method is invalid.
- * @exception E_SYSTEM A system error has occurred. @n
- * The method has failed to operate with the openssl library.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - The method has failed to operate with the openssl library.
*/
virtual result Initialize(void);
/**
- * Updates a multiple-part encryption or decryption operation.
+ * Updates the multiple-part encryption or decryption operation.
*
* @since 2.0
*
@@ -183,15 +189,16 @@ public:
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_OVERFLOW This operation has caused the memory to overflow.
* @exception E_INVALID_ARG The specified instance of Tizen::Base::ByteBuffer is invalid or empty.
- * @exception E_SYSTEM A system error has occurred. @n
- * The method has failed to operate with the openssl library, or
- * the Tizen::Base::ByteBuffer operation has failed.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - The method has failed to operate with the openssl library.
+ * - The Tizen::Base::ByteBuffer operation has failed.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
virtual Tizen::Base::ByteBuffer* UpdateN(const Tizen::Base::ByteBuffer& input);
/**
- * Finalizes a multiple-part encryption or decryption operation.
+ * Finalizes the multiple-part encryption or decryption operation.
*
* @since 2.0
*
@@ -200,9 +207,10 @@ public:
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_OVERFLOW This operation has caused the memory to overflow.
- * @exception E_SYSTEM A system error has occurred. @n
- * The method has failed to operate with the openssl library, or
- * the Tizen::Base::ByteBuffer operation has failed.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - The method has failed to operate with the openssl library.
+ * - The Tizen::Base::ByteBuffer operation has failed.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
virtual Tizen::Base::ByteBuffer* FinalizeN(void);
@@ -211,7 +219,7 @@ public:
* Wraps a key.
*
* @since 2.0
- *
+ * @pre Before calling this method, set a secret key using SetKey().
* @return A pointer to the Tizen::Base::ByteBuffer class that contains the output, @n
* else @c null if an error occurs
* @param[in] secretKey The secret key to wrap
@@ -221,10 +229,10 @@ public:
* @exception E_KEY_NOT_FOUND The specified key is not found.
* @exception E_INVALID_OPERATION The specified cipher operation mode for this method is invalid.
* @exception E_UNSUPPORTED_ALGORITHM The specified cipher algorithm for this method is invalid.
- * @exception E_SYSTEM A system error has occurred. @n
- * The method has failed to operate with the openssl library.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks A key is set using SetKey() before calling this method.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - The method has failed to operate with the openssl library.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
*/
virtual Tizen::Base::ByteBuffer* WrapN(const Tizen::Base::ByteBuffer& secretKey);
@@ -232,7 +240,7 @@ public:
* Unwraps a previously wrapped key.
*
* @since 2.0
- *
+ * @pre Before calling this method, set a secret key using SetKey().
* @return A pointer to the Tizen::Base::ByteBuffer class that contains the output, @n
* else @c null if an error occurs
* @param[in] wrappedKey The wrapped key to unwrap
@@ -242,10 +250,10 @@ public:
* @exception E_KEY_NOT_FOUND The specified key is not found.
* @exception E_INVALID_OPERATION The specified cipher operation mode for this method is invalid.
* @exception E_UNSUPPORTED_ALGORITHM The specified cipher algorithm for this method is invalid.
- * @exception E_SYSTEM A system error has occurred. @n
- * The method has failed to operate with the openssl library.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks A key is set using SetKey() before calling this method.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - The method has failed to operate with the openssl library.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
*/
virtual Tizen::Base::ByteBuffer* UnwrapN(const Tizen::Base::ByteBuffer& wrappedKey);