45 lines
1.2 KiB
Plaintext
45 lines
1.2 KiB
Plaintext
@using Core
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-12">
|
|
Paste File Content Here
|
|
<div class="input-group mb-2">
|
|
<input type="text" rows="6" class="form-control" placeholder="license key" aria-label="license key" @bind-value="@rawData">
|
|
</div>
|
|
</div>
|
|
<div class="col-12 text-right">
|
|
<button class="btn btn-outline-success" type="button" @onclick="() => GenerateKey()">Generate Key from data <i class="fas fa-key"></i></button>
|
|
</div>
|
|
@if (!string.IsNullOrEmpty(@keyGen))
|
|
{
|
|
<div class="col-12">
|
|
Click to Copy Generated Key to Clipboard
|
|
<CopyToClipboard Text="@keyGen" ShowText="true" />
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
@code {
|
|
private string rawData { get; set; } = "";
|
|
private string keyGen { get; set; } = "";
|
|
|
|
private async Task GenerateKey()
|
|
{
|
|
// recupero dati..
|
|
if (!string.IsNullOrEmpty(rawData))
|
|
{
|
|
var cMDV = new MachineDataValidator(rawData);
|
|
if (cMDV.hasValidData)
|
|
{
|
|
keyGen = cMDV.machineKeyHash;
|
|
}
|
|
else
|
|
{
|
|
keyGen = "";
|
|
}
|
|
}
|
|
await Task.Delay(1);
|
|
}
|
|
}
|