aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/DataObjectOperator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/function/DataObjectOperator.cpp')
-rw-r--r--src/core/function/DataObjectOperator.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/function/DataObjectOperator.cpp b/src/core/function/DataObjectOperator.cpp
index 1e216dd6..d5b746d6 100644
--- a/src/core/function/DataObjectOperator.cpp
+++ b/src/core/function/DataObjectOperator.cpp
@@ -29,6 +29,7 @@
#include "DataObjectOperator.h"
#include <qt-aes/qaesencryption.h>
+#include <boost/date_time.hpp>
#include "core/function/FileOperator.h"
#include "core/function/PassphraseGenerator.h"
@@ -65,7 +66,6 @@ GpgFrontend::DataObjectOperator::DataObjectOperator(int channel)
std::string GpgFrontend::DataObjectOperator::SaveDataObj(
const std::string& _key, const nlohmann::json& value) {
-
std::string _hash_obj_key = {};
if (_key.empty()) {
_hash_obj_key =
@@ -92,7 +92,8 @@ std::string GpgFrontend::DataObjectOperator::SaveDataObj(
auto encoded =
encryption.encode(QByteArray::fromStdString(to_string(value)), hash_key_);
- LOG(INFO) << _("Saving data object") << _hash_obj_key << "to" << obj_path << encoded.size() << "bytes";
+ LOG(INFO) << _("Saving data object") << _hash_obj_key << "to" << obj_path
+ << encoded.size() << "bytes";
FileOperator::WriteFileStd(obj_path.u8string(), encoded.toStdString());
@@ -128,7 +129,8 @@ std::optional<nlohmann::json> GpgFrontend::DataObjectOperator::GetDataObject(
QAESEncryption encryption(QAESEncryption::AES_256, QAESEncryption::ECB,
QAESEncryption::Padding::ISO);
- LOG(INFO) << _("Decrypting data object") << encoded.size() << hash_key_.size();
+ LOG(INFO) << _("Decrypting data object") << encoded.size()
+ << hash_key_.size();
auto decoded =
encryption.removePadding(encryption.decode(encoded, hash_key_));