From 1c90c4feceedc5331c68c192f0503f734732e6d5 Mon Sep 17 00:00:00 2001 From: Aymeric Bizouarn Date: Wed, 3 Apr 2024 11:52:39 +0200 Subject: [PATCH 1/2] Rename UseEncrytionKey to UseEncryptionKey --- PgpCore.Tests/UnitTests/UnitTestsSync.cs | 4 ++-- PgpCore/Models/EncryptionKeys.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PgpCore.Tests/UnitTests/UnitTestsSync.cs b/PgpCore.Tests/UnitTests/UnitTestsSync.cs index b44cc54..43942a0 100644 --- a/PgpCore.Tests/UnitTests/UnitTestsSync.cs +++ b/PgpCore.Tests/UnitTests/UnitTestsSync.cs @@ -1101,7 +1101,7 @@ public void DecryptStream_DecryptEncryptedStreamWithPreferredKey() foreach (long keyId in keyIdsInPublicKeyRing) { // Act - encryptionKeys.UseEncrytionKey(keyId); + encryptionKeys.UseEncryptionKey(keyId); using (Stream inputFileStream = testFactory.ContentStream) using (Stream outputFileStream = testFactory.EncryptedContentFileInfo.Create()) pgpEncrypt.EncryptStream(inputFileStream, outputFileStream); @@ -1300,7 +1300,7 @@ public void Verify_VerifyEncryptedAndSignedStreamForMultipleKeys() .Where(key => key.IsEncryptionKey).Select(key => key.KeyId).ToArray(); foreach (long keyId in keyIdsInPublicKeyRing) { - encryptionKeys.UseEncrytionKey(keyId); + encryptionKeys.UseEncryptionKey(keyId); using (Stream inputFileStream = testFactory.ContentStream) using (Stream outputFileStream = testFactory.EncryptedContentFileInfo.Create()) pgp.EncryptStreamAndSign(inputFileStream, outputFileStream); diff --git a/PgpCore/Models/EncryptionKeys.cs b/PgpCore/Models/EncryptionKeys.cs index 4cb8bf9..804ba8f 100644 --- a/PgpCore/Models/EncryptionKeys.cs +++ b/PgpCore/Models/EncryptionKeys.cs @@ -376,7 +376,7 @@ public PgpPrivateKey FindSecretKey(long keyId) /// If it cannot find the key, it will not change the preferred key. /// /// The keyId to find. - public void UseEncrytionKey(long keyId) + public void UseEncryptionKey(long keyId) { foreach (PgpPublicKeyRingWithPreferredKey publicKeyRing in PublicKeyRings) { From 2cb1754321515596e73c57edddde973ffcc05210 Mon Sep 17 00:00:00 2001 From: Aymeric Bizouarn Date: Wed, 3 Apr 2024 11:59:44 +0200 Subject: [PATCH 2/2] Removing XML parameter 'armor' that is no longer present in the function signature --- PgpCore/PGP.EncryptSync.cs | 1 - PgpCore/PGP.SignAsync.cs | 1 - PgpCore/PGP.SignSync.cs | 1 - 3 files changed, 3 deletions(-) diff --git a/PgpCore/PGP.EncryptSync.cs b/PgpCore/PGP.EncryptSync.cs index 2aae1dd..18d6233 100644 --- a/PgpCore/PGP.EncryptSync.cs +++ b/PgpCore/PGP.EncryptSync.cs @@ -257,7 +257,6 @@ public void EncryptAndSign( /// Encrypt and sign the string /// /// Plain string to be encrypted and signed - /// True, means a binary data representation as an ASCII-only text. Otherwise, false /// True to include integrity packet during signing /// Name of encrypted file in message, defaults to the input file name /// Optional headers to be added to the output diff --git a/PgpCore/PGP.SignAsync.cs b/PgpCore/PGP.SignAsync.cs index 568fc91..d26d6a1 100644 --- a/PgpCore/PGP.SignAsync.cs +++ b/PgpCore/PGP.SignAsync.cs @@ -105,7 +105,6 @@ public async Task SignAsync( /// Sign the string /// /// Plain string to be signed - /// True, means a binary data representation as an ASCII-only text. Otherwise, false /// Name of signed file in message, defaults to "name" /// Optional headers to be added to the output /// True, to use old format for encryption if you need compatibility with PGP 2.6.x. Otherwise, false diff --git a/PgpCore/PGP.SignSync.cs b/PgpCore/PGP.SignSync.cs index a575c5d..8cc1c51 100644 --- a/PgpCore/PGP.SignSync.cs +++ b/PgpCore/PGP.SignSync.cs @@ -105,7 +105,6 @@ public void Sign( /// Sign the string /// /// Plain string to be signed - /// True, means a binary data representation as an ASCII-only text. Otherwise, false /// Name of signed file in message, defaults to "name" /// Optional headers to be added to the output /// True, to use old format for encryption if you need compatibility with PGP 2.6.x. Otherwise, false