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/
public static class activation{#region redegit Key public static void Makeregeditactivationcode () {Reg Istry. Currentuser.createsubkey (@ "software\activation"); public static string Readregeditkey () {try {RegistryKey MyKey = Registry.CurrentUser.Op Ensubkey ("Software\\activation", true); Return Mykey.getvalue ("Activationcode"). ToString (); } catch {Setregeditkeyvalue (""); return null; }} public static void Setregeditkeyvalue (string value) {RegistryKey MyKey = Registry.CurrentUser.OpenSub Key ("Software\\activation", true); Mykey.setvalue ("Activationcode", value, registryvaluekind.string); } #endregion #region Get Hardware Information public static string Getmacaddress () {string Macaddresse s = ""; 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.securi Ty. 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}
Software license key and activation