prevent overriding 1253 encoding and set different default values in …#307
Draft
kostatsis wants to merge 1 commit intomattosaurus:masterfrom
Draft
prevent overriding 1253 encoding and set different default values in …#307kostatsis wants to merge 1 commit intomattosaurus:masterfrom
kostatsis wants to merge 1 commit intomattosaurus:masterfrom
Conversation
mattosaurus
reviewed
Feb 28, 2025
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>netstandard2.0</TargetFramework> | ||
| <TargetFramework>net472</TargetFramework> |
Owner
There was a problem hiding this comment.
Why is this now targeting .NET 4.72?
mattosaurus
reviewed
Feb 28, 2025
Comment on lines
+103
to
+112
| /* | ||
| Encoding cp1253 = Encoding.GetEncoding(1253); | ||
| string text; | ||
| using (StreamReader reader = new StreamReader(inputStream, cp1253)) | ||
| { | ||
| text = reader.ReadToEnd(); | ||
| } | ||
| byte[] cp1253Bytes = cp1253.GetBytes(text); | ||
| MemoryStream inputStream1253 = new MemoryStream(cp1253Bytes); | ||
| */ |
Owner
There was a problem hiding this comment.
Can you remove if not being used please
There was a problem hiding this comment.
PR Overview
This PR updates default encryption and hashing algorithms and adjusts the behavior of the encryption routine regarding character encoding.
- Updated default values: CompressionAlgorithm from Uncompressed to Zip, SymmetricKeyAlgorithm from TripleDes to Aes256, and HashAlgorithmTag from Sha1 to Sha256
- Modified Encrypt method to use CP1253 encoding via the GetStream overload instead of the default stream conversion
Reviewed Changes
| File | Description |
|---|---|
| PgpCore/PGP.cs | Default values for compression, symmetric key, and hashing updated to new standards |
| PgpCore/PGP.EncryptSync.cs | Updated stream creation to consistently use CP1253 encoding and removed previously active encoding steps |
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…some variables