Software license key and activation, licenseactivation
Http://stackoverflow.com/questions/16222674/software-license-key-and-activation
Https://github.com/Labs64
Http://www.codeproject.com/Articles/11012/License-Key-Generation
Https://ellipter.com/
Https://technet.microsoft.com/en-us/library/dd346641 (v = ws.10). aspx
Https://code.msdn.microsoft.com/windowsapps/Product-Key-Activation-to-16c92174/view/SourceCode
Https://activatar.codeplex.com/
Http://dotlicense.codeplex.com/
Http://www.codeproject.com/Articles/15496/Application-Trial-Maker
Http://www.c-sharpcorner.com/article/a-simple-approach-to-product-activation/
Http://www.codeproject.com/Articles/35009/How-to-Generate-and-Validate-CD-Keys-for-your-Soft
Https://licensekeygenerator.codeplex.com/
Http://softwareprotector.codeplex.com/
Http://skgl.codeplex.com/
Http://dotlicense.codeplex.com/
public static class Activation{ #region Redegit Key public static void MakeRegeditActivationCode() { Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Activation"); } public static string ReadRegeditKey() { try { RegistryKey myKey = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Activation", true); return myKey.GetValue("ActivationCode").ToString(); } catch { SetRegeditKeyValue(""); return null; } } public static void SetRegeditKeyValue(string value) { RegistryKey myKey = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Activation", true); myKey.SetValue("ActivationCode", value, RegistryValueKind.String); } #endregion #region Get Hardware Information public static string GetMacAddress() { string macAddresses = ""; foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces()) { macAddresses = nic.GetPhysicalAddress().ToString(); break; } return macAddresses; } public static string GetCpuId() { string cpuid = null; try { ManagementObjectSearcher mo = new ManagementObjectSearcher("select * from Win32_Processor"); foreach (var item in mo.Get()) { cpuid = item["ProcessorId"].ToString(); } return cpuid; } catch { return null; } } #endregion #region Hash Function public static string MyCustomHash(string input) { System.Security.Cryptography.MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider(); byte[] bs = System.Text.Encoding.UTF32.GetBytes(input); bs = x.ComputeHash(bs); System.Text.StringBuilder s = new System.Text.StringBuilder(); int select = 1; foreach (byte b in bs) { switch (select) { case 1: s.Append(b.ToString("x4").ToLower()); break; case 2: s.Append(b.ToString("x3").ToLower()); break; case 3: s.Append(b.ToString("x2").ToLower()); break; case 4: s.Append(b.ToString("x1").ToLower()); break; default: break; } select++; if (select > 4) select = 1; } string password = s.ToString(); return password; } #endregion}