Software license key and activation

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.