public void Execute(T command) { if (command.EncryptionType == EncryptionType.Aes) { command.Out = keyEncryptionProvider.EncryptPrivateKey(command.Out, command.Password, EncryptionType.Aes); } decoratedCommandHandler.Execute(command); }
public void Execute(T writeToFileCommand) { if (writeToFileCommand.EncryptionType == EncryptionType.Pkcs) { writeToFileCommand.Out = keyEncryptionProvider.EncryptPrivateKey(writeToFileCommand.Out, writeToFileCommand.Password, EncryptionType.Pkcs); } decoratedCommandHandler.Execute(writeToFileCommand); }