wabbajack/Wabbajack.CLI/Verbs/HashVariants.cs
Timothy Baldridge c782b63c6c WIP
2020-08-03 20:41:29 -06:00

25 lines
785 B
C#

using System;
using System.Threading.Tasks;
using CommandLine;
using Wabbajack.Common;
namespace Wabbajack.CLI.Verbs
{
[Verb("hash-variants", HelpText = "Print all the known variants (formats) of a hash")]
public class HashVariants : AVerb
{
[Option('i', "input", Required = true, HelpText = "Input Hash")]
public string Input { get; set; } = "";
protected override async Task<ExitCode> Run()
{
var hash = Hash.Interpret(Input);
Console.WriteLine($"Base64: {hash.ToBase64()}");
Console.WriteLine($"Hex: {hash.ToHex()}");
Console.WriteLine($"Long: {(long)hash}");
Console.WriteLine($"ULong (uncommon): {(ulong)hash}");
return ExitCode.Ok;
}
}
}