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. telnet小结

    几百年前就开始听说telnet了,却直到最近才真正完全搞懂!... http://www.cnblogs.com/wusthjp/archive/2012/01/05/2312975.html 可能要 ...

  2. Vue API阅读的小细节

    #后面是表达式,下面是参数列表,参数列表每行说明一个参数.每行的参数说明,最后边对应表达式的参数,左边是该参数的类型一类的说明.

  3. 爱上MVC3~布局页的继承与扩展

    回到 目录 在MVC3中引入了Razor引擎,这对于代码的表现力上是个突破,同时母板页也变成了_Layout,所以,我们就习惯上称它为布局页面,在razor里,布局页面是可以继承的,即,一个上下公用的 ...

  4. 带你走近AngularJS - 体验指令实例

    带你走近AngularJS系列: 带你走近AngularJS - 基本功能介绍 带你走近AngularJS - 体验指令实例 带你走近AngularJS - 创建自定义指令 ------------- ...

  5. Atitit main函数的ast分析  数组参数调用的ast astview解析

    Atitit main函数的ast分析  数组参数调用的ast astview解析 1.1. Xxcls.main(new String[]{"","bb"}) ...

  6. 搭建LNAMP环境(四)- 源码安装PHP7

    上一篇:搭建LNAMP环境(三)- 源码安装Apache2.4 一.安装PHP7 1.yum安装编译php需要的包 yum -y install libxml2 libxml2-devel curl- ...

  7. contentEditable属性设置是否可编辑元素的内容

    在HTML5中在标签新添加了一个属性contentEditable可以设置标签内的内容是否可以编辑: 设置contenteditable="true"标签内的元素(内容)可以编辑 ...

  8. jeasyUI的treegrid批量删除多行(转载)

    看上去,JavaScript的变量类型,也可以分为值类型和引用类型.赋值操作中,值类型,各自独立,互不干涉:引用类型,指针而已,大家指向同一个对象. 为什么这样说呢? 我是从jeasyUI的treeg ...

  9. Java 7 中的Switch 谈 Java版本更新和反编译知识

    Java 7 中的Switch 谈 Java版本更新和反编译知识          学习编程,享受生活,大家好,我是追寻梦的飞飞.今天主要讲述的是Java7中的更新Switch实现内部原理和JAD反编 ...

  10. Design3:使用HierarchyID构建数据的分层结构

    1,传统的分层结构是父子结构,表结构中有一个ParentID字段自引用表的主键,表示“归属”关系,例如 create table dbo.emph ( ID int not null primary ...