Skip to content

Feature/add symmetric enc dec#325

Merged
mattosaurus merged 18 commits intomasterfrom
feature/add-symmetric-enc-dec
Feb 24, 2026
Merged

Feature/add symmetric enc dec#325
mattosaurus merged 18 commits intomasterfrom
feature/add-symmetric-enc-dec

Conversation

@mattosaurus
Copy link
Owner

Bringing in changes from #322

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for symmetric encryption and decryption to the PgpCore library, implementing functionality that was requested in PR #322. The changes include both the core encryption/decryption logic and comprehensive test coverage.

Changes:

  • Added symmetric key support to EncryptionKeys model with new constructor and property
  • Modified encryption/decryption logic to handle both asymmetric and symmetric encryption methods
  • Added AddVersionHeader property to PGP class for controlling version header output
  • Fixed spelling errors throughout the codebase ("algorithm" was misspelled as "algorithim")
  • Updated constructors to accept raw byte[] passphrases in addition to string passphrases
  • Added KeyType.Symmetric enum value and test coverage for symmetric-only encryption

Reviewed changes

Copilot reviewed 43 out of 43 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Fixed spelling errors for "algorithm" in documentation
PgpCore/PgpCore.csproj Version bump to 6.6.0 with release notes
PgpCore/PGP.cs Added AddVersionHeader property for version header control
PgpCore/PGP.EncryptSync.cs, PGP.EncryptAsync.cs Added symmetric key encryption support via AddMethodRaw
PgpCore/PGP.DecryptSync.cs, PGP.DecryptAsync.cs Added symmetric key decryption support with PgpPbeEncryptedData handling
PgpCore/Models/EncryptionKeys.cs Added SymmetricKey property, new byte[] constructors, and symmetric-only constructor
PgpCore/Abstractions/IEncryptionKeys.cs Added SymmetricKey property to interface
PgpCore/PGP.KeySync.cs, PGP.KeyAsync.cs Fixed parameter names from "preferredSymetricKeyAlgorithms" to "preferredSymmetricKeyAlgorithms"
PgpCore.Tests/TestFactory.cs Added KeyType.Symmetric support and SymmetricKey property
PgpCore.Tests/UnitTests/Decrypt/DecryptAsync.String.cs Added dedicated symmetric encryption tests
Multiple test files Added KeyType.Symmetric to test data and SymmetricKey initializers
PgpCore.Tests/PgpCore.Tests.csproj Changed target framework (contains critical issue)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 41 out of 43 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
66.8% Coverage on New Code (required ≥ 80%)
6.1% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@mattosaurus mattosaurus merged commit adf92a5 into master Feb 24, 2026
3 of 4 checks passed
@mattosaurus mattosaurus deleted the feature/add-symmetric-enc-dec branch February 24, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants