aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/KeyPackageOperator.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2022-02-06 09:34:14 +0000
committerSaturneric <[email protected]>2022-02-06 09:34:39 +0000
commitcacca627a62ab2eba9eb4d37cfea40629ca0a89a (patch)
treec596c3c2252ebb0e3792ab4c561d7c7cd3f3e4b0 /src/core/function/KeyPackageOperator.cpp
parent<refactor>(core, ui): Adjust the core code directory structure. (diff)
downloadGpgFrontend-cacca627a62ab2eba9eb4d37cfea40629ca0a89a.tar.gz
GpgFrontend-cacca627a62ab2eba9eb4d37cfea40629ca0a89a.zip
<refactor>(src): Move and split the Global Settings Station
1. Move Global Settings Station to core 2. Separate the logic of DataObject 3. Resolve dependencies
Diffstat (limited to 'src/core/function/KeyPackageOperator.cpp')
-rw-r--r--src/core/function/KeyPackageOperator.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/function/KeyPackageOperator.cpp b/src/core/function/KeyPackageOperator.cpp
index 89210987..7ff65b50 100644
--- a/src/core/function/KeyPackageOperator.cpp
+++ b/src/core/function/KeyPackageOperator.cpp
@@ -28,17 +28,17 @@
#include "KeyPackageOperator.h"
-#include "qt-aes/qaesencryption.h"
-
#include "FileOperator.h"
+#include "function/PassphraseGenerator.h"
#include "function/gpg/GpgKeyGetter.h"
#include "function/gpg/GpgKeyImportExporter.h"
+#include "qt-aes/qaesencryption.h"
namespace GpgFrontend {
bool KeyPackageOperator::GeneratePassphrase(
const std::filesystem::path& phrase_path, std::string& phrase) {
- phrase = generate_passphrase(256);
+ phrase = PassphraseGenerator::GetInstance().Generate(256);
return FileOperator::WriteFileStd(phrase_path, phrase);
}
@@ -65,8 +65,8 @@ bool KeyPackageOperator::GenerateKeyPackage(
bool KeyPackageOperator::ImportKeyPackage(
const std::filesystem::path& key_package_path,
- const std::filesystem::path& phrase_path, GpgFrontend::GpgImportInformation &import_info) {
-
+ const std::filesystem::path& phrase_path,
+ GpgFrontend::GpgImportInformation& import_info) {
std::string encrypted_data;
FileOperator::ReadFileStd(key_package_path, encrypted_data);