资源简介
C#软件注册试用期限代码.zip

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
using System.IO;
using System.Management;
namespace ResgisterSystem
{
class AES
{
#region AES加密解密
///
/// AES 加密(高级加密标准,是下一代的加密算法标准,速度快,安全级别高,目前 AES 标准的一个实现是 Rijndael 算法)
///
/// 待加密密文
/// 加密密钥
///
public static string AESEncrypt(string EncryptString string EncryptKey)
{
if (string.IsNullOrEmpty(EncryptString)) { throw (new Exception(“密文不得为空“)); }
if (string.IsNullOrEmpty(EncryptKey)) { throw (new Exception(“密钥不得为空“)); }
string m_strEncrypt = ““;
byte[] m_btIV = Convert.Frombase64String(EncryptKey);
Rijndael m_AESProvider = Rijndael.Create();
try
{
byte[] m_btEncryptString = Encoding.Default.GetBytes(EncryptString);
MemoryStream m_stream = new MemoryStream();
CryptoStream m_csstream = new CryptoStream(m_stream m_AESProvider.CreateEncryptor(Encoding.Default.GetBytes(EncryptKey) m_btIV) CryptoStreamMode.Write);
m_csstream.Write(m_btEncryptString 0 m_btEncryptString.Length); m_csstream.FlushFinalBlock();
m_strEncrypt = Convert.Tobase64String(m_stream.ToArray());
m_stream.Close(); m_stream.Dispose();
m_csstream.Close(); m_csstream.Dispose();
}
catch (IOException ex) { throw ex; }
catch (CryptographicException ex) { throw ex; }
catch (ArgumentException ex) { throw ex; }
catch (Exception ex) { throw ex; }
finally { m_AESProvider.Clear(); }
return m_strEncrypt;
}
///
/// AES 解密(高级加密标准,是下一代的加密算法标准,速度快,安全级别高,目前 AES 标准的一个实现是 Rijndael 算法)
///
/// 待解密密文
/// 解密密钥
///
public static string AESDecrypt(string DecryptString string DecryptKey)
{
if (string.IsNullOrEmpty(DecryptString)) { throw (new Exception(“密文不得为空“)); }
if (string.IsNullOrEmpty(DecryptKey)) { throw (new Exception(“密钥不得为空“)); }
string m_strDecrypt = ““;
byte[] m_btIV = Convert.Frombase64String(DecryptKey);
Rijndael m_AESProvider = Rijndael.Create();
try
{
byte[] m_btDecryptString = Convert.Frombase64String(DecryptString);
MemoryStream m_stream = new MemoryStream();
CryptoStream m_csstream = new CryptoStream(m_stream m_AESProvider.CreateDecryptor(Encoding.Default.GetBytes(DecryptKey) m_btIV) CryptoStreamMode.Write);
m_css
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-12-01 12:52 试用\
目录 0 2014-12-01 12:52 试用\ResgisterSystem\
目录 0 2014-12-01 12:52 试用\ResgisterSystem\ResgisterSystem\
文件 3914 2014-10-30 03:26 试用\ResgisterSystem\ResgisterSystem\AES.cs
文件 19330 2014-11-01 17:15 试用\ResgisterSystem\ResgisterSystem\Form1.Designer.cs
文件 6726 2014-11-01 17:30 试用\ResgisterSystem\ResgisterSystem\Form1.cs
文件 5814 2014-11-01 17:15 试用\ResgisterSystem\ResgisterSystem\Form1.resx
文件 2243 2014-10-30 15:24 试用\ResgisterSystem\ResgisterSystem\MD5.cs
文件 496 2014-10-30 01:30 试用\ResgisterSystem\ResgisterSystem\Program.cs
目录 0 2014-12-01 12:52 试用\ResgisterSystem\ResgisterSystem\Properties\
文件 1362 2014-10-30 01:30 试用\ResgisterSystem\ResgisterSystem\Properties\AssemblyInfo.cs
文件 2880 2014-10-30 01:30 试用\ResgisterSystem\ResgisterSystem\Properties\Resources.Designer.cs
文件 5612 2014-10-30 01:30 试用\ResgisterSystem\ResgisterSystem\Properties\Resources.resx
文件 1100 2014-10-30 01:30 试用\ResgisterSystem\ResgisterSystem\Properties\Settings.Designer.cs
文件 249 2014-10-30 01:30 试用\ResgisterSystem\ResgisterSystem\Properties\Settings.settings
文件 5940 2014-10-31 18:45 试用\ResgisterSystem\ResgisterSystem\ResgisterSystem.csproj
文件 488 2014-10-30 05:09 试用\ResgisterSystem\ResgisterSystem\ResgisterSystem.csproj.user
文件 1831 2014-10-31 17:45 试用\ResgisterSystem\ResgisterSystem\SaoMiaoYingJian.cs
目录 0 2014-12-01 12:52 试用\ResgisterSystem\ResgisterSystem\bin\
目录 0 2014-12-01 12:52 试用\ResgisterSystem\ResgisterSystem\bin\Debug\
文件 20992 2014-11-15 20:39 试用\ResgisterSystem\ResgisterSystem\bin\Debug\ResgisterSystem.exe
文件 54784 2014-11-15 20:39 试用\ResgisterSystem\ResgisterSystem\bin\Debug\ResgisterSystem.pdb
文件 14328 2014-11-21 22:10 试用\ResgisterSystem\ResgisterSystem\bin\Debug\ResgisterSystem.vshost.exe
文件 490 2009-06-11 05:14 试用\ResgisterSystem\ResgisterSystem\bin\Debug\ResgisterSystem.vshost.exe.manifest
目录 0 2014-12-01 12:52 试用\ResgisterSystem\ResgisterSystem\obj\
目录 0 2014-12-01 12:52 试用\ResgisterSystem\ResgisterSystem\obj\Debug\
目录 0 2014-10-01 13:30 试用\ResgisterSystem\ResgisterSystem\obj\Debug\Refactor\
文件 180 2015-05-30 18:13 试用\ResgisterSystem\ResgisterSystem\obj\Debug\ResgisterSystem.Form1.resources
文件 180 2014-10-31 18:46 试用\ResgisterSystem\ResgisterSystem\obj\Debug\ResgisterSystem.Properties.Resources.resources
文件 1270 2014-11-21 22:10 试用\ResgisterSystem\ResgisterSystem\obj\Debug\ResgisterSystem.csproj.FileListAbsolute.txt
文件 910 2014-11-15 19:06 试用\ResgisterSystem\ResgisterSystem\obj\Debug\ResgisterSystem.csproj.GenerateResource.Cache
............此处省略10个文件信息
相关资源
- 020ASP.NET车辆综合管理系统.zip
- C# TcpListener 例程(源码)
- C# 内嵌其他exe窗体的完美封装
- PDF文件 阅读控件 (VeryPDF PDFView OCX)
- C#自定义控件案例--美化GroupBox.rar
- BouncyCastle C#源码
- C#高级编程(第10版) 百度网盘资源
- Unity5实战:使用C#和Unity开发多平台游
- zw_ASP.NET通用权限管理系统源代码含文
- 24652561RevitWPFAddin.zip
- ASP.NET网站建设实战--人民邮电出版社
- 传智播客ASP.NET[特供第三季].txt
- Winform通用经典快速开发CS框架-outloo
- C#爬取音乐源码.zip
- Rudin著第一册—阅读密码www.zasp.net_仅
- PracticalWPFChartsandGraphics.rar
- cb-9X-C#winform实现PDF阅读功能.rar
- sU-WV-C#比赛记时软件.rar
- u5-TW-C#打印操作--使用GDI绘图打印学生
- z1_C#打印操作--使用GDI绘图打印学生信
- C#打印操作--使用GDI绘图打印学生信息
- asp.net网上教学系统全站程序.zip
- C#管理学生考勤及作业登记系统
- 2321363LearnWPFMVVM-XAMLCandtheMVVMpattern.pdf
- 商品销售管理系统C#源码
- 松下PLC与C#上位机通讯库含程序.rar
- C#图书管理系统.rar
- C#基于BouncyCastle.Crypto的SM2_3实现导入即
- zw_WPF_开发教程(_中文版).zip
- asp.net进销存系统源码.rar
评论
共有 条评论