Exemplo n.º 1
0
        private static EncryptionAlgorithm ToEncryptionAlgorithm(PackageEncryption encryption)
        {
            switch (encryption)
            {
            case PackageEncryption.ZipCrypto:
                return(EncryptionAlgorithm.PkzipWeak);

            case PackageEncryption.Aes256:
                return(EncryptionAlgorithm.WinZipAes256);

            default:
                throw new NotSupportedException("The specified encryption method is not supported.");
            }
        }
Exemplo n.º 2
0
 private static EncryptionAlgorithm ToEncryptionAlgorithm(PackageEncryption encryption)
 {
     switch (encryption)
     {
         case PackageEncryption.ZipCrypto:
             return EncryptionAlgorithm.PkzipWeak;
         case PackageEncryption.Aes256:
             return EncryptionAlgorithm.WinZipAes256;
         default:
             throw new NotSupportedException("The specified encryption method is not supported.");
     }
 }