易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net(C#)字符串加密

asp.net(C#)字符串加密
2010-03-12 09:59
using System;   
using System.Collections.Generic;   
using System.Text;   
using System.Security.Cryptography;//Cryptography密码术   
namespace DAL   
{   
    public class Encry   
    {   
        public Encry() { }  
        #region AES加密   
  
        public static string Encrypt(string toEncrypt)   
        {   
            byte[] keyArray = UTF8Encoding.UTF8.GetBytes("12345678901234567890123456789012");   
            byte[] toEncryptArray = UTF8Encoding.UTF8.GetBytes(toEncrypt);   
  
            RijndaelManaged rDel = new RijndaelManaged();//using System.Security.Cryptography;   
            rDel.Key = keyArray;   
            rDel.Mode = CipherMode.ECB;//using System.Security.Cryptography;   
            rDel.Padding = PaddingMode.PKCS7;//using System.Security.Cryptography;   
  
            ICryptoTransform cTransform = rDel.CreateEncryptor();//using System.Security.Cryptography;   
            byte[] resultArray = cTransform.TransformFinalBlock(toEncryptArray, 0, toE


相关文档:

C#与Flash交互

C#与Flash交互 (转自小磊在线)
C#与Flash交互
前段日子公司要求做一个C#与Flash交互的东西,用来C#与短信猫通讯将数据传到Flash上显示与操作的应用。
第一步C#添加组件
打开VS2005-工具-选择工具箱项-COM组件-选择Shockwave Flash Object-确定
添加好组件往场景上拖放,如果提示注册需求注册
c# 注册控件-在运行输 ......

C#调用 win32遍历win桌面控件的算法

private static int level=0
public static int FindGUILike(ref int hWndArray,int hWndStart,ref string windowText,ref string className,ref string parentText)
{
int hwnd=0;
int r=0;
StringBuilder sWindowText=new StringBuilder();
StringBuilder sClassname=new StringBuilder();
StringBuilder sParentT ......

C#中继承实现父类方法、重写、重载

继承是派生类(子类)去实现(重写<override>、重构<new>)基类(父类)的方法或属性。从而获取在派生类中要实现的功能。
子类调用父类构造方法,在父类中有个实现姓名和年龄的构造方法但是中子类也要实现这样的功能这时子类不用再次去写这个功能只要去调用父类的功能即可。
public class Person
 & ......

C#与Firebird开发 查询返回别名中文字段

最近在忙于 将租赁管理系统mssql数据库转移至firebird数据 以减少成本负担 这个常见问题解决方案留给大家 有更好的或者撇砖块的来着不拒 呵呵
MS-sql在通常 C#代码里 我们提交一个查询字符串 只需如: string sql=" select id 编号,[name] 姓名,sex 性别 from users";
提交即可返回table
但是在 firebird在字段 命名或者 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号