Example #1
0
        internal Stream GetExtractDecryptor(Stream input)
        {
            Stream input2;

            if (_Encryption_FromZipFile == EncryptionAlgorithm.PkzipWeak)
            {
                input2 = new ZipCipherStream(input, _zipCrypto_forExtract);
            }

#if AESCRYPTO
            else if (_Encryption_FromZipFile == EncryptionAlgorithm.WinZipAes128 ||
                     _Encryption_FromZipFile == EncryptionAlgorithm.WinZipAes256)
            {
                input2 = new WinZipAesCipherStream(input, _aesCrypto_forExtract, _CompressedFileDataSize);
            }
#endif

            else
            {
                input2 = input;
            }

            return(input2);
        }
Example #2
0
        internal Stream GetExtractDecryptor(Stream input)
        {
            Stream input2;
            if (_Encryption_FromZipFile == EncryptionAlgorithm.PkzipWeak)
                input2 = new ZipCipherStream(input, _zipCrypto_forExtract);

#if AESCRYPTO
            else if (_Encryption_FromZipFile == EncryptionAlgorithm.WinZipAes128 ||
                _Encryption_FromZipFile == EncryptionAlgorithm.WinZipAes256)
                input2 = new WinZipAesCipherStream(input, _aesCrypto_forExtract, _CompressedFileDataSize);
#endif

            else
                input2 = input;

            return input2;
        }