Skip to content

Conversation

@kostatsis
Copy link

…some variables


<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net472</TargetFramework>
Copy link
Owner

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?

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);
*/
Copy link
Owner

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

@mattosaurus mattosaurus requested a review from Copilot February 28, 2025 08:25
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.

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.

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