2.2.6 - System.Security.Cryptography.CryptographicException

Any questions related to version 2 or version 3 should be ask here. / Toutes les questions sur la version 2 ou la version 3 devraient être demandées ici.
Post Reply
radapex
The Accomplished One / L'Accompli
Posts: 86
Joined: Tue Mar 15, 2011 10:41 am

2.2.6 - System.Security.Cryptography.CryptographicException

Post by radapex »

I've suddenly started getting a System.Security.Cryptography.CryptographicException when trying to load line files in STHS 2.2.6.

Code: Select all

Exception Type:
    System.Security.Cryptography.CryptographicException

Message - Source
    Padding is invalid and cannot be removed. - mscorlib

Stack Track
    at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)
    at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
    at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
    at System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing)
    at System.IO.Stream.Close()
    at SimonTHockeySimulator.SimonT.EncryptFile(String strInputFile, String strOutputFile, String strKeyPassword, String strIVPassword, CryptoAction Direction, ZipAction Zip, Boolean booDeleteInput)
Occurring on 32-bit Windows 7 Professional w/ .NET Framework 4.5.2 (previously 4.5.1). Same system I've been using for years, and I've been using 2.2.6 for 3 weeks without any issues. An automated line load ran successfully today at noon EDT, but the automated (and now manual) simulation has failed. I've ruled out issues with the line files by restoring some of the successful files from earlier and attempting to load them.

I also tried reverting to version 2.2.5 and got the same error.
SimonT
STHS Owner / Propriétaire du STHS
Posts: 14804
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: 2.2.6 - System.Security.Cryptography.CryptographicExcept

Post by SimonT »

The file you are trying to load is corrupt.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English Manual - Manuel Français
radapex
The Accomplished One / L'Accompli
Posts: 86
Joined: Tue Mar 15, 2011 10:41 am

Re: 2.2.6 - System.Security.Cryptography.CryptographicExcept

Post by radapex »

SimonT wrote:The file you are trying to load is corrupt.
It's happening with all line files, even the ones that had successfully loaded 7 hours earlier.
radapex
The Accomplished One / L'Accompli
Posts: 86
Joined: Tue Mar 15, 2011 10:41 am

Re: 2.2.6 - System.Security.Cryptography.CryptographicExcept

Post by radapex »

That's really strange. I uploaded a fresh copy of my line file and it loaded properly. I'll write it off as a one-off. Thanks SImon.
Post Reply