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#添加组件
打开VS2005-工具-选择工具箱项-COM组件-选择Shockwave Flash Object-确定
添加好组件往场景上拖放,如果提示注册需求注册
c# 注册控件-在运行输 ......
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 ......
继承是派生类(子类)去实现(重写<override>、重构<new>)基类(父类)的方法或属性。从而获取在派生类中要实现的功能。
子类调用父类构造方法,在父类中有个实现姓名和年龄的构造方法但是中子类也要实现这样的功能这时子类不用再次去写这个功能只要去调用父类的功能即可。
public class Person
& ......
最近在忙于 将租赁管理系统mssql数据库转移至firebird数据 以减少成本负担 这个常见问题解决方案留给大家 有更好的或者撇砖块的来着不拒 呵呵
MS-sql在通常 C#代码里 我们提交一个查询字符串 只需如: string sql=" select id 编号,[name] 姓名,sex 性别 from users";
提交即可返回table
但是在 firebird在字段 命名或者 ......