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 }

  

Software license key and activation的更多相关文章

  1. [LeetCode] License Key Formatting 注册码格式化

    Now you are given a string S, which represents a software license key which we would like to format. ...

  2. webstorm license key

    JetBrains WebStorm注册码 UserName: William License Key : ===== LICENSE BEGIN ===== 45550-12042010 00001 ...

  3. Sublime Text 注册码 License Key

    Sublime Text (3103版本可用) 注册码 License Key  

  4. phpstorm8 设置及license key

    phpstorm8 license key Learn Programming ===== LICENSE BEGIN ===== 63758-12042010 00000Ryqh0NCC73lpRm ...

  5. powerdesign的license key到期,解决办法

    到2013年9月24日为止我把这文件覆盖了都是行的!不行的请留言说明下! 下载地址:powerdesigner license key 15.1 找到安装目录,直接覆盖就行了!

  6. [Swift]LeetCode482. 密钥格式化 | License Key Formatting

    You are given a license key represented as a string S which consists only alphanumeric character and ...

  7. 【leetcode】482. License Key Formatting

    problem 482. License Key Formatting solution1: 倒着处理,注意第一个字符为分隔符的情况要进行删除,注意字符的顺序是否正序. class Solution ...

  8. Bitdefender Total Security 2014 Free 6 Months & 12 month License Key

    German Only – Bitdefender Total Security 2014 Free 6 Months Serial License Keyhttp://www.bitdefender ...

  9. charles license key

    Download: http://www.charlesproxy.com/ (Official Web-site) Registered name: anthony ortolani License ...

随机推荐

  1. webservice3

    什么是bottom up 什么是top down 通过浏览器访问如 http://localhost:8080/HelloWS/services/HelloWSsss?wsdl  获取的 wsdl, ...

  2. 浮动ip

    浮动ip 其实就是动态ip, 静态IP是固定不变的,不管你用不用这个IP上网,这个IP都是属于你的动态IP则是在使用的时候由DHCP服务器临时分配给你的,不用则不分配在网络中如果设置了一部分静态IP地 ...

  3. jmap

    环境: 现有一个独立运行的系统S(有独立的jre,但是没jdk),现想通过jmap导出其内存堆栈信息.于是另外安装一个jdk.可是jdk的版本跟S系统的jre不能对应上.出了很多错误. 总是报错: C ...

  4. navigationController pop的几种方法

    一,popViewControllerAnimated [self.navigationController popViewControllerAnimated:YES]; 二,popToRootVi ...

  5. Java-继承,多态练习0922-02

    创建如下三个类:(People类中的三个方法分别输出一些信息,ChinaPeople 和AmericanPeople类重写父类的三个方法). 父类: package com.lianxi1; publ ...

  6. PDO事务处理

    PDO事务处理 2014-9-3 10:44:19 By jiancaigege==================================== 概要:将多条sql操作(增删改)作为一个操作单 ...

  7. Atitit 发帖机系列(6) USRQBN2201 setup spec安装程序的实现规范与标准化解决方案

    Atitit 发帖机系列(6) USRQBN2201 setup spec安装程序的实现规范与标准化解决方案 安装主要解决一个问题,就是resin的内容启动路径以及端口..这里是使用的端口8077 主 ...

  8. iOS----Asset Catalog的用法

    文/余书懿(简书作者)原文链接:http://www.jianshu.com/p/7aa06ce22a7b著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”. 引言 Asset Catalo ...

  9. 如何优雅的使用vue+vux开发app -02

    如何优雅的使用vue+vux开发app -02 很明显这又是一个错误的示范,请勿模仿 使用动态组件实现保留状态的路由 <!DOCTYPE html> <html> <he ...

  10. How Google TestsSoftware - Part Five

    Instead of distinguishingbetween code, integration and system testing, Google uses the language ofsm ...