diff options
author | Saturneric <[email protected]> | 2023-02-11 14:10:09 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2023-02-11 14:10:09 +0000 |
commit | 6a75817c85b0d4a97cea82ad2331736cff9913cf (patch) | |
tree | 261b01c4dc55a28241694a5e292d9fc5c77b6319 /src/core/function/KeyPackageOperator.cpp | |
parent | feat: upgrade qt framework to 6.3 (diff) | |
download | GpgFrontend-6a75817c85b0d4a97cea82ad2331736cff9913cf.tar.gz GpgFrontend-6a75817c85b0d4a97cea82ad2331736cff9913cf.zip |
fix: reduce info level logs
Diffstat (limited to 'src/core/function/KeyPackageOperator.cpp')
-rw-r--r-- | src/core/function/KeyPackageOperator.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/function/KeyPackageOperator.cpp b/src/core/function/KeyPackageOperator.cpp index 19c572f8..5c917ab8 100644 --- a/src/core/function/KeyPackageOperator.cpp +++ b/src/core/function/KeyPackageOperator.cpp @@ -39,7 +39,7 @@ namespace GpgFrontend { bool KeyPackageOperator::GeneratePassphrase( const std::filesystem::path& phrase_path, std::string& phrase) { phrase = PassphraseGenerator::GetInstance().Generate(256); - SPDLOG_INFO("generated passphrase: {} bytes", phrase.size()); + SPDLOG_DEBUG("generated passphrase: {} bytes", phrase.size()); return FileOperator::WriteFileStd(phrase_path, phrase); } @@ -47,7 +47,7 @@ bool KeyPackageOperator::GenerateKeyPackage( const std::filesystem::path& key_package_path, const std::string& key_package_name, KeyIdArgsListPtr& key_ids, std::string& phrase, bool secret) { - SPDLOG_INFO("generating key package: {}", key_package_name); + SPDLOG_DEBUG("generating key package: {}", key_package_name); ByteArrayPtr key_export_data = nullptr; if (!GpgKeyImportExporter::GetInstance().ExportAllKeys( @@ -64,7 +64,7 @@ bool KeyPackageOperator::GenerateKeyPackage( QAESEncryption::Padding::ISO); auto encoded = encryption.encode(data, hash_key); - SPDLOG_INFO("writing key package: {}", key_package_name); + SPDLOG_DEBUG("writing key package: {}", key_package_name); return FileOperator::WriteFileStd(key_package_path, encoded.toStdString()); } @@ -72,7 +72,7 @@ bool KeyPackageOperator::ImportKeyPackage( const std::filesystem::path& key_package_path, const std::filesystem::path& phrase_path, GpgFrontend::GpgImportInformation& import_info) { - SPDLOG_INFO("importing key package: {]", key_package_path.u8string()); + SPDLOG_DEBUG("importing key package: {]", key_package_path.u8string()); std::string encrypted_data; FileOperator::ReadFileStd(key_package_path, encrypted_data); @@ -84,7 +84,7 @@ bool KeyPackageOperator::ImportKeyPackage( std::string passphrase; FileOperator::ReadFileStd(phrase_path, passphrase); - SPDLOG_INFO("passphrase: {} bytes", passphrase.size()); + SPDLOG_DEBUG("passphrase: {} bytes", passphrase.size()); if (passphrase.size() != 256) { SPDLOG_ERROR("failed to read passphrase: {}", phrase_path.u8string()); return false; @@ -100,7 +100,7 @@ bool KeyPackageOperator::ImportKeyPackage( auto decoded = encryption.removePadding(encryption.decode(encoded, hash_key)); auto key_data = QByteArray::fromBase64(decoded); - SPDLOG_INFO("key data size: {}", key_data.size()); + SPDLOG_DEBUG("key data size: {}", key_data.size()); if (!key_data.startsWith(GpgConstants::PGP_PUBLIC_KEY_BEGIN) && !key_data.startsWith(GpgConstants::PGP_PRIVATE_KEY_BEGIN)) { return false; |