From 3bde3d889bd503a6578d606580e84bca5aca9fe7 Mon Sep 17 00:00:00 2001 From: Llewellyn Pritchard Date: Fri, 18 Feb 2022 14:52:49 +0200 Subject: [PATCH 1/2] Encrypt hex literals when needed --- src/PdfSharp/Pdf.Internal/PdfEncoders.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PdfSharp/Pdf.Internal/PdfEncoders.cs b/src/PdfSharp/Pdf.Internal/PdfEncoders.cs index 661d4dc6..a2fb9195 100644 --- a/src/PdfSharp/Pdf.Internal/PdfEncoders.cs +++ b/src/PdfSharp/Pdf.Internal/PdfEncoders.cs @@ -398,6 +398,7 @@ public static byte[] FormatStringLiteral(byte[] bytes, bool unicode, bool prefix } else { + securityHandler?.EncryptBytes(bytes); pdf.Append('<'); for (int idx = 0; idx < count; idx++) pdf.AppendFormat("{0:X2}", bytes[idx]); From 4afd4450e647d45058e2db8fb28709bb1ba54c03 Mon Sep 17 00:00:00 2001 From: Llewellyn Pritchard Date: Fri, 18 Feb 2022 15:41:26 +0200 Subject: [PATCH 2/2] Update details --- src/PdfSharp/PdfSharp.csproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PdfSharp/PdfSharp.csproj b/src/PdfSharp/PdfSharp.csproj index 96548b98..339f4e9b 100644 --- a/src/PdfSharp/PdfSharp.csproj +++ b/src/PdfSharp/PdfSharp.csproj @@ -11,11 +11,11 @@ false false true - https://github.com/LionelVallet/PDFsharp - 0 + https://github.com/leppie/PDFsharp + hex-fix 1.51.5185 - empira Software GmbH, Lionel Vallet - PDFSharp.NetStandard2 + empira Software GmbH, Lionel Vallet, leppie + PDFSharp.NetStandard2.HexFix PDFSharp, NET, Standard, Core, PDF, Creation true StrongnameKey.snk