Fix accessing freed memory in X509CertificateStore::Update()
[platform/framework/native/appfw.git] / inc / FSecCryptoAesCipher.h
index 93b3248..50059b2 100644 (file)
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -40,7 +39,8 @@ class _SymmetricCipher;
  * @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
+ *     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 <a href="../org.tizen.native.appprogramming/html/guide/security/ciphers.htm">Ciphers</a>.
  *
@@ -117,6 +117,7 @@ public:
         *      Encrypts the data (single-part).
         *
         *      @since          2.0
+        *      @pre                    Before calling this method, a secret key and an initial vector should be set 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
@@ -131,7 +132,6 @@ public:
         *                                                                              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.
         */
        virtual Tizen::Base::ByteBuffer* EncryptN(const Tizen::Base::ByteBuffer& input);
 
@@ -139,7 +139,7 @@ public:
         *      Decrypts the data (single-part).
         *
         *      @since          2.0
-        *
+        *      @pre                    Before calling this method, a secret key and an initial vector should be set 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
@@ -152,8 +152,7 @@ public:
         *      @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.
+        *      @remarks                The specific error code can be accessed using the GetLastResult() method.
         */
        virtual Tizen::Base::ByteBuffer* DecryptN(const Tizen::Base::ByteBuffer& input);
 
@@ -212,7 +211,7 @@ public:
         *      Wraps a key.
         *
         *      @since          2.0
-        *
+        *      @pre                    Before calling this method, a secret key should be set 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
@@ -224,8 +223,7 @@ public:
         *      @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.
+        *      @remarks                The specific error code can be accessed using the GetLastResult() method.
         */
        virtual Tizen::Base::ByteBuffer* WrapN(const Tizen::Base::ByteBuffer& secretKey);
 
@@ -233,7 +231,7 @@ public:
         *      Unwraps a previously wrapped key.
         *
         *      @since          2.0
-        *
+        *      @pre                    Before calling this method, a secret key should be set 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
@@ -245,8 +243,7 @@ public:
         *      @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.
+        *      @remarks                The specific error code can be accessed using the GetLastResult() method.
         */
        virtual Tizen::Base::ByteBuffer* UnwrapN(const Tizen::Base::ByteBuffer& wrappedKey);