using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Windows.Forms;
namespace MX_keygen
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private static double log10(ulong x)
{
return Math.Log(x) / Math.Log(10.0);
}
public static string Encoder(ulong str)
{
string text = "";
for (int i = (int)Math.Floor(log10(str) / log10(62UL)); i >= 0; i--)
{
int num = (int)Math.Floor(str / Math.Pow(62.0, (double)i));
text +=keyaaa[num].ToString();
str -= (ulong)((double)num * Math.Pow(62.0, (double)i));
}
return text;
}
public static ulong Decoder(string str)
{
ulong num = 0UL;
int num2 = str.Length - 1;
for (int i = 0; i <= num2; i++)
{
num += (ulong)((long)keyaaa.IndexOf(str.Substring(i, 1).ToCharArray()[0]) * (long)((ulong)Math.Pow(62.0, (double)(num2 - i))));
}
return num;
}