Change elmConfig path for applying read-only root filesystem
[platform/core/security/ode.git] / lib / internal-encryption.cpp
index 48ad20c..c1bf9e3 100644 (file)
@@ -62,10 +62,38 @@ int InternalEncryption::decrypt(const std::string& password)
        }
 }
 
-int InternalEncryption::verifyPassword(const std::string& password)
+int InternalEncryption::recovery()
 {
        try {
-               return context->methodCall<int>("InternalEncryption::verifyPassword",
+               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;
@@ -83,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 {