//网络上搜集的。直接使用VS2005新建一个应用程序项目,然后复制本代码到FORM的CS代码文件中。再运行就可以得到一个C盘下的"c://cuteeditor.lic"文件,上传到你的站点下的BIN文件夹下覆盖掉原来的cuteeditor.lic文件就好。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Security.Cryptography;
using System.IO;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
System.Security.Cryptography.DESCryptoServiceProvider des = new System.Security.Cryptography.DESCryptoServiceProvider();
des.IV = new byte[] { 70, 0x35, 50, 0x42, 0x31, 0x38, 0x36, 70 };
des.Key = new byte[] { 70, 0x35, 50, 0x42, 0x31, 0x38, 0x36, 70 };
using (FileStream fs = new FileStream("c://cuteeditor.lic", FileMode.Create, FileAccess.Write, FileShare.None))
{
using (CryptoStream cs = new CryptoStream(fs, des.CreateEncryptor(), CryptoStreamMode.Write))
{
using (StreamWriter sw = new StreamWriter(cs))
{
sw.Write("None;zh-cn;None;8H489467LS631834L;CuteEditor.Editor for asp.net is licensed.;1.6;5;lvmiaomu.com;125.76.229.233;09/09/2099");
}
}
Console.ReadLine();
}
}
}
}