diff --git a/src/UglyToad.PdfPig/Encryption/AesEncryptionHelper.cs b/src/UglyToad.PdfPig/Encryption/AesEncryptionHelper.cs index 86399417..3e4cd7b6 100644 --- a/src/UglyToad.PdfPig/Encryption/AesEncryptionHelper.cs +++ b/src/UglyToad.PdfPig/Encryption/AesEncryptionHelper.cs @@ -13,6 +13,11 @@ public static byte[] Decrypt(byte[] data, byte[] finalKey) { + if (data.Length == 0) + { + return data; + } + var iv = new byte[16]; Array.Copy(data, iv, iv.Length);