Change elmConfig path for applying read-only root filesystem
[platform/core/security/ode.git] / lib / internal-encryption.cpp
index 6a15e00..c1bf9e3 100644 (file)
@@ -44,10 +44,10 @@ int InternalEncryption::umount()
        }
 }
 
-int InternalEncryption::encrypt(const std::string& password)
+int InternalEncryption::encrypt(const std::string& password, unsigned int options)
 {
        try {
-               return context->methodCall<int>("InternalEncryption::encrypt", password);
+               return context->methodCall<int>("InternalEncryption::encrypt", password, options);
        } catch (runtime::Exception& e) {
                return -1;
        }
@@ -62,6 +62,44 @@ int InternalEncryption::decrypt(const std::string& password)
        }
 }
 
+int InternalEncryption::recovery()
+{
+       try {
+               return context->methodCall<int>("InternalEncryption::recovery");
+       } catch (runtime::Exception& e) {
+               return -1;
+       }
+}
+
+int InternalEncryption::isPasswordInitialized()
+{
+       try {
+               return context->methodCall<int>("InternalEncryption::isPasswordInitialized");
+       } catch (runtime::Exception& e) {
+               return -1;
+       }
+}
+
+int InternalEncryption::initPassword(const std::string& password)
+{
+       try {
+               return context->methodCall<int>("InternalEncryption::initPassword",
+                                                                               password);
+       } catch (runtime::Exception& e) {
+               return -1;
+       }
+}
+
+int InternalEncryption::cleanPassword(const std::string& password)
+{
+       try {
+               return context->methodCall<int>("InternalEncryption::cleanPassword",
+                                                                               password);
+       } catch (runtime::Exception& e) {
+               return -1;
+       }
+}
+
 int InternalEncryption::changePassword(const std::string& oldPassword,
                                                                        const std::string& newPassword)
 {
@@ -73,6 +111,16 @@ int InternalEncryption::changePassword(const std::string& oldPassword,
        }
 }
 
+int InternalEncryption::verifyPassword(const std::string& password)
+{
+       try {
+               return context->methodCall<int>("InternalEncryption::verifyPassword",
+                                                                               password);
+       } catch (runtime::Exception& e) {
+               return -1;
+       }
+}
+
 int InternalEncryption::getState()
 {
        try {
@@ -82,4 +130,13 @@ int InternalEncryption::getState()
        }
 }
 
+unsigned int InternalEncryption::getSupportedOptions()
+{
+       try {
+               return context->methodCall<unsigned int>("InternalEncryption::getSupportedOptions");
+       } catch (runtime::Exception& e) {
+               return -1;
+       }
+}
+
 } // namespace ode