[WIP] AES decryption support in ZipInputStream
I started looking at this and then haven't had time to try to finish it yet, so here it is in case anyone has any ideas.
The basic decryption seems to be ok, but the auth code checking is disabled as it doesn't work. I think the issue is the way that inflater input buffer runs all its data through the crypto transform rather than just the part which is actually encrypted, so the auth code calculation in the AES transform gets the wrong result. Not sure of the best way to handle it - might need changes in the input buffer, or a different approach to calculating the value?
The changes also have a couple of more minor changes in separate commits, in case they're useful on their own.
I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the SharpZipLib open source product (the "Contribution"). My Contribution is licensed under the MIT License.
@piksel any interest in 1e0bc14 as a seperate PR (add constants for a couple more AES related things)? I'd started looking at AES encryption support in ZipFile around the time as looking at this one (https://github.com/Numpsy/SharpZipLib/commit/7ffb073a7b46f427a3472872a545ad41890dc3cc), and that could benefit from the shared definitions.
81445e2 could also be useful seperately (removes some int casts on the compression method), though using entry.CompressionMethod without something like the last part of the change in #333 might alter the way reading (unsupported) AES encrypted entries is handled)