-
Notifications
You must be signed in to change notification settings - Fork 101
prevent overriding 1253 encoding and set different default values in … #307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>netstandard2.0</TargetFramework> | ||
| <TargetFramework>net472</TargetFramework> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this now targeting .NET 4.72?
| /* | ||
| 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); | ||
| */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove if not being used please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
…some variables