From 57f2ec8f2a11d4eacd03beefc6809806d049a1b8 Mon Sep 17 00:00:00 2001 From: Llewellyn Pritchard Date: Fri, 18 Feb 2022 14:52:49 +0200 Subject: [PATCH] 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]);