From cacca627a62ab2eba9eb4d37cfea40629ca0a89a Mon Sep 17 00:00:00 2001 From: Saturneric Date: Sun, 6 Feb 2022 17:34:14 +0800 Subject: (src): Move and split the Global Settings Station 1. Move Global Settings Station to core 2. Separate the logic of DataObject 3. Resolve dependencies --- src/core/function/KeyPackageOperator.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/function/KeyPackageOperator.cpp') 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); -- cgit v1.2.3