summaryrefslogtreecommitdiff
path: root/include/web_app_enc.h
diff options
context:
space:
mode:
authorDongsun Lee <ds73.lee@samsung.com>2015-08-13 07:35:58 (GMT)
committerDongsun Lee <ds73.lee@samsung.com>2015-08-13 07:39:51 (GMT)
commit671aefceb8f5249194c2abfc1bdeddb7d16a7631 (patch)
tree46f5e1e555980a34bfb5eade99257886416a7fcc /include/web_app_enc.h
parent391c9b75f18989c2778c0cc804a4eddb38a3f050 (diff)
downloadlibwebappenc-tizen_3.0.m1_tv.zip
libwebappenc-tizen_3.0.m1_tv.tar.gz
libwebappenc-tizen_3.0.m1_tv.tar.bz2
Change-Id: Ic9a60b295bff13bb59c1c6990dfbad569e92c267 Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Diffstat (limited to 'include/web_app_enc.h')
-rw-r--r--include/web_app_enc.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/include/web_app_enc.h b/include/web_app_enc.h
index 2e31a3c..68a1fd9 100644
--- a/include/web_app_enc.h
+++ b/include/web_app_enc.h
@@ -31,6 +31,10 @@ extern "C" {
*/
+/**
+ * @brief WAE Errors.
+ * @since_tizen 3.0
+ */
typedef enum
{
WAE_ERROR_NONE = 0x00, /**< Successful */
@@ -46,11 +50,22 @@ typedef enum
} wae_error_e;
/**
+ * @brief Application Type.
+ * @since_tizen 3.0
+ */
+typedef enum
+{
+ WAE_DOWNLOADED_NORMAL_APP = 0, /**< Downloaded Normal Application*/
+ WAE_DOWNLOADED_GLOBAL_APP = 1, /**< Downloaded Global Application*/
+ WAE_PRELOADED_APP = 2 /**< Preloaded Application*/
+} wae_app_type_e;
+
+/**
* @brief Encrypts web application data with internal key(APP DEK: Application Data Encryption Key).
*
* @since_tizen 3.0
* @param[in] pPkgId The package id of an application.
- * @param[in] isPreloaded True(!=0) if the application is preloaded, otherwise false(==0).
+ * @param[in] appType The application type.
* @param[in] pData The data block to be encrypted.
* @param[in] dataLen The length of the data block.
* @param[out] ppEncryptedData The data block contaning encrypted data block. Memory allocated for ppEncryptedData. Has to be freed by free() function.
@@ -66,14 +81,14 @@ typedef enum
*
* @see wae_decrypt_web_application()
*/
-int wae_encrypt_web_application(const char* pPkgId, int isPreloaded, const unsigned char* pData, size_t dataLen, unsigned char** ppEncryptedData, size_t* pEncDataLen);
+int wae_encrypt_web_application(const char* pPkgId, wae_app_type_e appType, const unsigned char* pData, size_t dataLen, unsigned char** ppEncryptedData, size_t* pEncDataLen);
/**
* @brief Encrypts web application data with internal key.
*
* @since_tizen 3.0
* @param[in] pPkgId The package id of an application.
- * @param[in] isPreloaded True(!=0) if the application is preloaded, otherwise false(==0).
+ * @param[in] appType The application type.
* @param[in] pData The data block to be decrypted.
* @param[in] dataLen The length of the data block.
* @param[out] ppDecryptedData Data block contaning decrypted data block. Memory allocated for ppEncryptedData. Has to be freed by free() function.
@@ -89,13 +104,14 @@ int wae_encrypt_web_application(const char* pPkgId, int isPreloaded, const unsig
*
* @see wae_encrypt_web_application()
*/
-int wae_decrypt_web_application(const char* pPkgId, int isPreloaded, const unsigned char* pData, size_t dataLen, unsigned char** ppDecryptedData, size_t* pDecDataLen);
+int wae_decrypt_web_application(const char* pPkgId, wae_app_type_e appType, const unsigned char* pData, size_t dataLen, unsigned char** ppDecryptedData, size_t* pDecDataLen);
/**
* @brief Remove a APP DEK(Application Data Encryption Key) used for encrytpion and decryption of a web application.
*
* @since_tizen 3.0
* @param[in] pPkgId The package id of an application.
+ * @param[in] appType The application type.
*
* @return #WAE_ERROR_NONE on success, otherwise a negative error value
* @retval #WAE_ERROR_INVALID_PARAMETER Invalid input parameter
@@ -105,7 +121,7 @@ int wae_decrypt_web_application(const char* pPkgId, int isPreloaded, const unsig
* @retval #WAE_ERROR_UNKNOWN Failed with unknown reason
*
*/
-int wae_remove_app_dek(const char* pPkgId);
+int wae_remove_app_dek(const char* pPkgId, wae_app_type_e appType);
/**