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
Ïà¹ØÎĵµ£º
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 ......
public enum GUIInfoType
{
guiText.
guiTextClass,
guiTextParent,
guiTextClassParent,
}
private static int level=0
public static int FindGUILike(ref int hWndArray,int hWndStart,ref string window ......
¿´Á˺ܶà.°´ÕÕ ×Ô¼ºÃ÷°×½âÊÍһϠ.NET RefºÍOut¹Ø¼ü×Ö ¶ÔÓÚÖµÀàÐÍ¡£ Èç¹û²»Ê¹ÓÃref /outÔò´«µÝµÄÖ»ÊÇÕâЩֵµÄCOPY, ʹÓÃÁËRefºÍOutµÄЧ¹û¾Í¼¸ºõºÍCÖÐʹÓÃÁËÖ¸Õë±äÁ¿Ò»Ñù¡£(´«µÝµÄ¾ÍÊÇÔÖµ),ËüÄܹ»ÈÃÄãÖ±½Ó¶ÔÔÊý½øÐвÙ×÷£¬¶ø²»ÊǶÔÄǸöÔÊýµÄCopy½øÐвÙ×÷ ¶ÔÓÚÒýÓÃÀàÐÍ: Èç¹û²»Ê¹ÓÃref /out,ÒòΪ´«µÝµÄÊÇÒýÓÃÀàÐ͵ĵØÖ·Öµ,Ô ......
ËØÊýÊÇÖ»Äܱ»1»ò±¾ÉíÕû³ý£¬ÇÒ²»ÄÜΪÆäËûÁ½¸öÕûÊýµÄ³Ë»ý¡£1¡¢2¡¢3±¾Éí¾ÍÊÇËØÊý£¬ÅжÏÒ»¸öÊýÊÇ·ñÎªËØÊý£¬Ö»ÐèÒªÓÃÕâ¸öÖµÒÀ´Î³ýÒÔ2µ½ËüµÄ¿ª·½Êý£¬Èç¹ûÆäÖÐÓÐÒ»¸öÊý¿ÉÒÔÕû³ý£¬ÄÇô¸ÃÖµ²»ÎªËØÊý£¬·µÖ®ÎªËØÊý¡£´úÂëÈçÏÂ
publicboolprimeNumber(intn)
{
¡¡¡¡boolb=true;
¡¡¡¡if(n==1||n==2)
¡¡¡¡¡¡¡¡b=true;
¡¡¡¡else
¡¡¡¡{ ......