Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C# ¼ÓÃÜ£­TripleDES

TripleDES
Êô¶Ô³Æ¼ÓÃÜ£¬¶Ô³Æ¼ÓÃÜÔÚ¼ÓÃܺͽâÃÜʱ¶¼Ê¹ÓÃÏàͬµÄÃÜÔ¿£¬Ëٶȿ졣
TripleDESCryptoServiceProvider µÄÃû³Æ¿Õ¼äÊÇ£º
System.Security.Cryptography
byte[] plaintextBuffer = System.Text.Encoding.UTF8.GetBytes("Ã÷ÎÄ");
//¼ÓÃÜ
TripleDESCryptoServiceProvider tripleDES = new TripleDESCryptoServiceProvider();
ICryptoTransform transform = tripleDES.CreateEncryptor();
byte[] cipherTextBuffer = transform.TransformFinalBlock(plaintextBuffer, 0, plaintextBuffer.Length);
lbl.Text = Convert.ToBase64String(cipherTextBuffer) + "<br />";
transform.Dispose();
//½âÃÜ
TripleDESCryptoServiceProvider tripleDES2 = new TripleDESCryptoServiceProvider();
ICryptoTransform transform2 = tripleDES2.CreateDecryptor(tripleDES.Key, tripleDES.IV);
byte[] decryption = transform2.TransformFinalBlock(cipherTextBuffer, 0, cipherTextBuffer.Length);
lbl.Text += System.Text.Encoding.UTF8.GetString(decryption) + "<br />";
transform2.Dispose();
½âÃÜʱ£¬Ê¹ÓüÓÃÜµÄ Key ºÍ IV¡£


Ïà¹ØÎĵµ£º

ʹÓÃC#ÕýÔò±í´ïʽƥÅäÏà¹Ø×Ö·û´®

C#ÕýÔò±í´ïʽƥÅä×Ö·û´®µÄ·½·¨ÈçÏ£º
1.ʹÓÃC#ÖÐʹÓÃÕýÔò±í´ïʽSystem.Text.RegularExpressionsÃüÃû¿Õ¼ä£»
2.ʹÓÃC#ÖÐʹÓÃÕýÔò±í´ïʽMatches()·½·¨Æ¥Åä×Ö·û´®£¬¸ñʽÈçÏ£º
MatchCollection Matches = Regex.Matches(Str, Pattern, RegexOptions.IgnoreCase | RegexOptions.ExplicitC ......

C#¶ÔͼƬµÄ¼¸ÖÖ¼òµ¥´¦Àí

ÓÖÓÐÒ»¶Îʱ¼äûÓиüÐÂÁË£¬È±ÉÙѧϰµÄÈÈÇéÁË¡£½ñÌìÌù¼¸¸öͼƬ´¦ÀíµÄС¼¼ÇÉ£¬Ï£Íû¶Ô´ó¼ÒÓÐÓãº
(1)ÈçºÎ»ñÈ¡.gifͼƬÖеĸ÷¸öÖ¡£¿
(2)ÈçºÎ»ñȡͼƬµÄËõÂÔͼ£¿
(3)ÈçºÎ“½ØÈ¡”ͼƬµÄÖ¸¶¨ÇøÓò£¿
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
public class ImageHelp ......

C#±¾ÖÊÂÛ

»ùÀàµÄÖØÐ´£º
new:£¨½öÕë¶ÔÅÉÉúÀàÓÃÅÉÉúʵÀýµ÷ÓÃʱ²ÅÆð×÷Óã¬Ä¿µÄÊÇÔÚÅÉÉúÀàÖÐÓÃÀ´¸²¸Ç»ùÀàµÄ·½·¨£©
1.ÅÉÉúÀ๹½¨³ÉµÄʵÀý£¬µ±µ÷ÓÃÓÉnew ÐÞÊεķ½·¨Ê±£¬¸²¸Ç»ùÀànew ·½·¨¡£
2.ÅÉÉúÀ๹½¨³ÉµÄʵÀý¸³¸ø»ùÀà±äÁ¿Ê±£¬ÔÙµ÷ÓÃÓÉnew ÐÞÊεķ½·¨Ê±£¬½«Ö´ÐлùÀàÖеķ½·¨¡£
virtual¡¢override
1.ÓÉÅÉÉúÀ๹½¨µÄʵÀý£¬²»¹ÜÊÇÓÃÅÉÉ ......

ʹÓÃc#¿ª·¢mapserverÖ®ÁùstyleObj

styleObjÓÃÓÚÉèÖÃͼ²ãµÄ·ûºÅ¡£ËüÔÚclassObjÖж¨Ò壬һ°ãÓÚsymbolObjÒ»ÆðʹÓá£Í¨¹ýÉèÖÃstyleObj£¬¿ÉÒÔ²úÉúǧ±äÍò»¯£¬·á¸»¶à²ÊµÄµØÍ¼¡£
Ò»¸ö¼òµ¥µÄstyleObjʾÀý£º
CLASS
NAME "Primary Roads"
STYLE
SYMBOL "circle"
COLOR 178 114 1
SIZE 15
END #style1
STYLE
SYMBOL "circle"
COLOR 254 161 0
SIZE 7
END #s ......

C# ¼ÓÃÜ£­RSA

RSA
Êô²»¶Ô³Æ¼ÓÃÜ£¬Ê¹ÓÃÒ»¸ö¹«Ô¿Ò»¸ö˽Կ£¬¹«Ô¿¿ÉÒÔ¹«¿ªÓÃÒÔ¼ÓÃÜ£¬Ë½Ô¿Ñϸñ±£ÃÜÓÃÓÚ½âÃÜ£¬RSA ÊʺÏÓÚÊý¾ÝÁ¿²»´óµÄ¼ÓÃÜ£¬±ÈÈç¼ÓÃܶԳƼÓÃܵÄÃÜÔ¿¡£
RSACryptoServiceProvider
µÄÃû³Æ¿Õ¼äÊÇ£º
System.Security.Cryptography
RSACryptoServiceProvider rsaSend = new RSACryptoServiceProvider();
string plaintext = ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ