Add recovery APIs to use when there is something wrong with encryption
[platform/core/security/ode.git] / lib / ode / external-encryption.cpp
index 64ba04f..e578c65 100644 (file)
@@ -64,6 +64,15 @@ int ode_external_encryption_decrypt(const char* password)
        return external.decrypt(password);
 }
 
+int ode_external_encryption_recovery()
+{
+       ODEContext client;
+       RET_ON_FAILURE(client.connect() == 0, ODE_ERROR_CONNECTION_REFUSED);
+       ExternalEncryption external = client.createInterface<ExternalEncryption>();
+
+       return external.recovery();
+}
+
 int ode_external_encryption_is_password_initialized(bool* result)
 {
        RET_ON_FAILURE(result, ODE_ERROR_INVALID_PARAMETER);