}
INFO("Encryption started...");
- ::vconf_set_str(INTERNAL_STATE_VCONF_KEY, "error_partially_encrypted");
engine->encrypt(MasterKey, options);
setOptions(options & getSupportedOptions());
INFO("Sync disk...");
INFO("Encryption completed");
::vconf_set_str(INTERNAL_STATE_VCONF_KEY, "encrypted");
+ ::reboot(RB_AUTOBOOT);
} catch (runtime::Exception &e) {
+ ::vconf_set_str(INTERNAL_STATE_VCONF_KEY, "error_partially_encrypted");
ERROR("Encryption failed - " + std::string(e.what()));
}
- ::reboot(RB_AUTOBOOT);
};
std::thread asyncWork(encryptWorker);
}
INFO("Decryption started...");
- ::vconf_set_str(INTERNAL_STATE_VCONF_KEY, "error_partially_encrypted");
engine->decrypt(MasterKey, getOptions());
INFO("Sync disk...");
sync();
INFO("Decryption completed");
::vconf_set_str(INTERNAL_STATE_VCONF_KEY, "unencrypted");
+ ::reboot(RB_AUTOBOOT);
} catch (runtime::Exception &e) {
+ ::vconf_set_str(INTERNAL_STATE_VCONF_KEY, "error_partially_encrypted");
ERROR("Decryption failed - " + std::string(e.what()));
}
- ::reboot(RB_AUTOBOOT);
};
std::thread asyncWork(decryptWorker);