From 8edbd18a0770ab819b3ac131573fa8e83564a63e Mon Sep 17 00:00:00 2001 From: Eliot Jones Date: Sun, 4 Jun 2023 17:02:27 +0100 Subject: [PATCH] use encoding aware reader for decrypt --- src/UglyToad.PdfPig/Encryption/EncryptionHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UglyToad.PdfPig/Encryption/EncryptionHandler.cs b/src/UglyToad.PdfPig/Encryption/EncryptionHandler.cs index f02f1c6d..0251ac6c 100644 --- a/src/UglyToad.PdfPig/Encryption/EncryptionHandler.cs +++ b/src/UglyToad.PdfPig/Encryption/EncryptionHandler.cs @@ -401,7 +401,7 @@ return token; } - var data = OtherEncodings.StringAsLatin1Bytes(stringToken.Data); + var data = stringToken.GetBytes(); var decrypted = DecryptData(data, reference);