public static Create ( string args ) : |
||
args | string | |
Результат |
static void Main(string[] args) { var response = CommandLineParameters.ValidateArgs(args); if (response.Succeeded == false) { System.Console.Error.WriteLine(response.Message); } else { var parameters = CommandLineParameters.Create(args); EncryptionManager encryptionManager = new EncryptionManager(); encryptionManager.InitialVector = parameters.InitialVector; encryptionManager.EncryptionKey = parameters.EncryptionKey; using (var stream = System.IO.File.OpenRead(parameters.Source)) { if (parameters.IsDecrypting) { PerformDecrypt(parameters, encryptionManager, stream); } else { PerformEncrypt(parameters, encryptionManager, stream); } } } }