-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathProgram.cs
More file actions
48 lines (42 loc) · 1.09 KB
/
Program.cs
File metadata and controls
48 lines (42 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Reflection;
using System.Text;
using McMaster.Extensions.CommandLineUtils;
namespace Kizuna
{
[Command(
Name = "Kizuna",
FullName = "Kizuna",
Description = "A tool to encrypt and decrypt files using AES-256-GCM encryption."
)]
[Subcommand(typeof(Commands.GenerateKeyCommand))]
[Subcommand(typeof(Commands.EncryptCommand))]
[Subcommand(typeof(Commands.DecryptCommand))]
public class Program
{
public static int Main(string[] args)
{
var app = new CommandLineApplication<Program>();
app.HelpOption();
Console.OutputEncoding = Encoding.UTF8;
app.Conventions.UseDefaultConventions();
if (args.Length == 0)
{
app.ShowHelp();
}
try
{
app.Execute(args);
}
catch
{
return 1;
}
return 0;
}
private int OnExecute(CommandLineApplication app)
{
return 0;
}
}
}