Hi,
Most of the password protected workbooks work fine, but in some cases we get following error
__Source array was not long enough. Check srcIndex and length, and the array's lower bounds.__
The call stack appears as:
```
EPPlus.dll!OfficeOpenXml.Utils.EncryptionInfo.ReadBinary(byte[] data = {byte[1057]}) Line 77 C#
EPPlus.dll!OfficeOpenXml.Utils.EncryptedPackageHandler.GetStreamFromPackage(OfficeOpenXml.Utils.IStorage storage = COM Object, OfficeOpenXml.ExcelEncryption encryption = {OfficeOpenXml.ExcelEncryption}) Line 632 + 0x20 bytes C#
EPPlus.dll!OfficeOpenXml.Utils.EncryptedPackageHandler.DecryptPackage(System.IO.FileInfo fi = {System.IO.FileInfo}, OfficeOpenXml.ExcelEncryption encryption = {OfficeOpenXml.ExcelEncryption}) Line 267 + 0x1a bytes C#
EPPlus.dll!OfficeOpenXml.ExcelPackage.ConstructNewFile(System.IO.Stream stream = {System.IO.MemoryStream}, string password = "PASSWORD") Line 526 + 0x5a bytes C#
EPPlus.dll!OfficeOpenXml.ExcelPackage.ExcelPackage(System.IO.FileInfo newFile = {System.IO.FileInfo}, string password = "PASSWORD") Line 238 + 0x3c bytes C#
```
The EncryptedPackageHandler gives this error on line 77:
```
Array.Copy(data, 44, text, 0, (int)HeaderSize - 34);
```
Can you please help?
Most of the password protected workbooks work fine, but in some cases we get following error
__Source array was not long enough. Check srcIndex and length, and the array's lower bounds.__
The call stack appears as:
```
EPPlus.dll!OfficeOpenXml.Utils.EncryptionInfo.ReadBinary(byte[] data = {byte[1057]}) Line 77 C#
EPPlus.dll!OfficeOpenXml.Utils.EncryptedPackageHandler.GetStreamFromPackage(OfficeOpenXml.Utils.IStorage storage = COM Object, OfficeOpenXml.ExcelEncryption encryption = {OfficeOpenXml.ExcelEncryption}) Line 632 + 0x20 bytes C#
EPPlus.dll!OfficeOpenXml.Utils.EncryptedPackageHandler.DecryptPackage(System.IO.FileInfo fi = {System.IO.FileInfo}, OfficeOpenXml.ExcelEncryption encryption = {OfficeOpenXml.ExcelEncryption}) Line 267 + 0x1a bytes C#
EPPlus.dll!OfficeOpenXml.ExcelPackage.ConstructNewFile(System.IO.Stream stream = {System.IO.MemoryStream}, string password = "PASSWORD") Line 526 + 0x5a bytes C#
EPPlus.dll!OfficeOpenXml.ExcelPackage.ExcelPackage(System.IO.FileInfo newFile = {System.IO.FileInfo}, string password = "PASSWORD") Line 238 + 0x3c bytes C#
```
The EncryptedPackageHandler gives this error on line 77:
```
Array.Copy(data, 44, text, 0, (int)HeaderSize - 34);
```
Can you please help?