Skip to content

Commit

Permalink
Improve tool
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Malík committed Jul 22, 2018
1 parent 89dfa66 commit ee9af4f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,30 @@
using System.Linq;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MalikP.Ubiquiti.DatabaseExporter.EncryptPasswordTool
{
public class Program
{
private static IIoC _ioc;

static async Task Main(string[] args)
[STAThread]
static void Main(string[] args)
{
SetupInversionOfControl();
var encryptor = _ioc.Resolve<RsaCertificateEncryptor>();

Console.WriteLine(encryptor.Encrypt(args.First()));
var encrypted = encryptor.Encrypt(args.First());
Clipboard.SetText(encrypted);

Console.WriteLine(string.Empty);
Console.WriteLine(string.Empty);
Console.ForegroundColor = ConsoleColor.DarkCyan;
Console.WriteLine(encrypted);
Console.ResetColor();
Console.WriteLine(string.Empty);
Console.WriteLine(string.Empty);
}

private static void SetupInversionOfControl()
Expand Down

0 comments on commit ee9af4f

Please sign in to comment.