资源简介
使用mac地址对电脑授权,输入mac地址,选择时间,使用des加密,生成文件 密钥见源文件中
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
using System.IO;
namespace FMSLicenseMachine
{
///
public class DES
{
///
///
///
///
public static string Encode(string str string key)
{
try
{
DESCryptoServiceProvider provider = new DESCryptoServiceProvider();
provider.Key = Encoding.ASCII.GetBytes(key.Substring(0 8));
provider.IV = Encoding.ASCII.GetBytes(key.Substring(0 8));
byte[] bytes = Encoding.GetEncoding(“utf-8“).GetBytes(str);
MemoryStream stream = new MemoryStream();
CryptoStream stream2 = new CryptoStream(stream provider.CreateEncryptor() CryptoStreamMode.Write);
stream2.Write(bytes 0 bytes.Length);
stream2.FlushFinalBlock();
StringBuilder builder = new StringBuilder();
foreach (byte num in stream.ToArray())
{
builder.AppendFormat(“{0:X2}“ num);
}
stream.Close();
return builder.ToString();
}
catch (Exception) { return “xxxx“; }
}
///
///
///
///
public static string Decode(string str string key)
{
try
{
DESCryptoServiceProvider provider = new DESCryptoServiceProvider();
provider.Key = Encoding.ASCII.GetBytes(key.Substring(0 8));
provider.IV = Encoding.ASCII.GetBytes(key.Substring(0 8));
byte[] buffer = new byte[str.Length / 2];
for (int i = 0; i < (str.Length / 2); i++)
{
int num2 = Convert.ToInt32(str.Substring(i * 2 2) 0x10);
buffer[i] = (byte)num2;
}
MemoryStream stream = new MemoryStream();
CryptoStream stream2 = new CryptoStream(stream provider.CreateDecryptor() CryptoStreamMode.Write);
stream2.Write(buffer 0 buffer.Length);
stream2.FlushFinalBlock();
stream.Close();
return Encoding.GetEncoding(“UTF-8“).GetString(stream.ToArray());
}
catch (Exception) { return ““; }
}
public static void main(string[] asd)
{
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
I.A.... 941 2018-03-01 13:25 FMSLicenseMachine.sln
I.A.... 18944 2018-03-01 13:25 FMSLicenseMachine.suo
I.A.... 15872 2018-03-01 13:25 FMSLicenseMachine\bin\Debug\FMSLicenseMachine.exe
I.A.... 34304 2018-03-01 13:25 FMSLicenseMachine\bin\Debug\FMSLicenseMachine.pdb
I.A.... 14328 2018-03-01 13:25 FMSLicenseMachine\bin\Debug\FMSLicenseMachine.vshost.exe
I.A.... 83456 2018-03-01 13:25 FMSLicenseMachine\bin\Release\FMSLicenseMachine.exe
I.A.... 32256 2018-03-01 13:25 FMSLicenseMachine\bin\Release\FMSLicenseMachine.pdb
I.A.... 14328 2018-03-01 13:25 FMSLicenseMachine\bin\Release\FMSLicenseMachine.vshost.exe
I.A.... 490 2018-03-01 13:25 FMSLicenseMachine\bin\Release\FMSLicenseMachine.vshost.exe.manifest
I.A.... 2864 2018-03-01 13:25 FMSLicenseMachine\DES.cs
I.A.... 67646 2018-03-01 13:25 FMSLicenseMachine\fms.ico
I.A.... 3967 2018-03-01 13:25 FMSLicenseMachine\FMSLicenseMachine.csproj
I.A.... 6301 2018-03-01 13:25 FMSLicenseMachine\Form1.cs
I.A.... 9977 2018-03-01 13:25 FMSLicenseMachine\Form1.Designer.cs
I.A.... 5814 2018-03-01 13:25 FMSLicenseMachine\Form1.resx
I.A.... 746 2018-03-01 13:25 FMSLicenseMachine\obj\Debug\FMSLicenseMachine.csproj.FileListAbsolute.txt
I.A.... 847 2018-03-01 13:25 FMSLicenseMachine\obj\Debug\FMSLicenseMachine.csproj.GenerateResource.Cache
I.A.... 15872 2018-03-01 13:25 FMSLicenseMachine\obj\Debug\FMSLicenseMachine.exe
I.A.... 180 2018-03-01 13:25 FMSLicenseMachine\obj\Debug\FMSLicenseMachine.Form1.resources
I.A.... 34304 2018-03-01 13:25 FMSLicenseMachine\obj\Debug\FMSLicenseMachine.pdb
I.A.... 180 2018-03-01 13:25 FMSLicenseMachine\obj\Debug\FMSLicenseMachine.Properties.Resources.resources
I.A.... 762 2018-03-01 13:25 FMSLicenseMachine\obj\Release\FMSLicenseMachine.csproj.FileListAbsolute.txt
I.A.... 847 2018-03-01 13:25 FMSLicenseMachine\obj\Release\FMSLicenseMachine.csproj.GenerateResource.Cache
I.A.... 180 2018-03-01 13:25 FMSLicenseMachine\obj\Release\FMSLicenseMachine.Form1.resources
I.A.... 32256 2018-03-01 13:25 FMSLicenseMachine\obj\Release\FMSLicenseMachine.pdb
I.A.... 180 2018-03-01 13:25 FMSLicenseMachine\obj\Release\FMSLicenseMachine.Properties.Resources.resources
I.A.... 83456 2018-03-01 13:25 FMSLicenseMachine\obj\Release\LicenseMachine.exe
I.A.... 498 2018-03-01 13:25 FMSLicenseMachine\Program.cs
I.A.... 1384 2018-03-01 13:25 FMSLicenseMachine\Properties\AssemblyInfo.cs
I.A.... 2884 2018-03-01 13:25 FMSLicenseMachine\Properties\Resources.Designer.cs
............此处省略18个文件信息
相关资源
- SuperMap Deskpro .NET 提取道路中心线
- 基于des的加密解密系统
- cc2530核心板原理图
- Altium Designer 10 破解文件及LICENSE
- WinRemoteDesktop 简易远程桌面管理工具
- 密码学课程设计DES加解密实现
- CodeSoft 9.0 LabelManager2.dll
- 五款天线PCB封装 Altium Designer
- ubuntu-14.04-desktop-amd64.iso(网盘链接,
- Docker Desktop Installer.part01.rar
- Citrix Desktop 7.5 license 70用户永久激活
- tm_destripe.sav 去条带补丁
- DES加密算法的verilog程序
- 根据IP获取MAC地址
- Murata日本村田的ADS design kit
- SAP PowerDesigner v16.6.1.0.5066. x64 破解文件
- STM32f103zet6.Schlib 器件原理图 封装 Al
- Altium Designer 单片机原件库
- ArcGIS10.7.1 的官方中文汉化语言包
- PyQt5系列教程(二)利用QtDesigner设计
- Deskt12312312op.zip
- 各种贴片铝电解电容Altium Designer PC
- AD Altium Designer STM8 STM32 库
- 经典教材 神经网络设计 书配代码 N
- mac地址修改器,可以修改mac地址,可
- ubuntu-16.04.3-desktop-amd64.iso.torrent
- 电机驱动模块 altium designer 文件.SchD
- Altium Designer_天线原理图库PS:自己花
- Tableau Desktop Pro for Mac
- STC12c5a60s2封装,LQFP-44_M原理图和pcb封
评论
共有 条评论