wabbajack/Wabbajack.CLI/Verbs/Encrypt.cs

24 lines
752 B
C#
Raw Normal View History

using System.Threading.Tasks;
using Alphaleonis.Win32.Filesystem;
2020-01-31 22:38:56 +00:00
using CommandLine;
using Wabbajack.Common;
namespace Wabbajack.CLI.Verbs
{
[Verb("encrypt", HelpText = @"Encrypt local data and store it in AppData\Local\Wabbajack", Hidden = true)]
public class Encrypt : AVerb
2020-01-31 22:38:56 +00:00
{
[Option('n', "name", Required = true, HelpText = @"Credential to encrypt and store in AppData\Local\Wabbajack")]
public string Name { get; set; }
[Option('i', "input", Required = true, HelpText = @"Source data file name")]
public string Input { get; set; }
protected override async Task<int> Run()
2020-01-31 22:38:56 +00:00
{
File.ReadAllBytes(Input).ToEcryptedData(Name);
2020-01-31 22:38:56 +00:00
return 0;
}
}
}