/ ****** Snow dragon original ******* /
// Copyright, the end is not allowed to reprint
Today's experiment is still relatively smooth, the regular expression is very cool in the morning, the MD5 and SHA1 encryption at night are also used. The following is the experimental summary (the washing machine is in the washing clothing, take the opportunity to write some things).
First additional point encryption knowledge: MD5 and SHA1 are hash encryption technology, so-called hash encryption is no matter what your input string is, how long, the encryption is made into a unique settlement, MD5 encryption After the lattice length of the schist, I have a number of 32-bit. SHA1 I have 40 today. This type of encryption method is that the encryption method is open, but you can't reverse it, you have to be exhausted. , The difficulty is very difficult, theoretically 8-bit password combination (26 letters 10 digital 21 common English symbols) 8 times, with the current comparison machine machine for more than a year. However, the recent MD5 has been cracked, can quickly collide with the password, but the crack machine has not been circulated, and the general application is still possible, and SHA1 is relatively safe.
Handup encryption, using a function indicated that Y = f (x), X is the input string, f is the algorithm, Y is the encrypted schist, f is disclosed, and the unique X only the unique Y X Only the user knows, so Y is unique. Now the MD5 that is crack is found to have a few X to correspond to Y, and can quickly find X.
Encryption technology is popular with public key encryption for authentication, interested friends can refer to related encrypted books.
The use of MD5 in C # is very simple, using the following static method: Temp_str = system.Web.Security.FormSauthentication.HashPasswordforStoringInfigfile (Temp_str, "MD5"); you can get the encrypted string, the static method is very simple, Temp_str is You have to encrypt the string variable, "MD5" means using MD5 encryption, if you use "sha1", use SHA1 encrypted, enough EASY, hurry your password to verify your password.
From above we can experience, C # is really a treasure of Microsoft's town, offering the namespace covers all of our commonly used, what are you waiting for, come to learn C # together with me. Summary has been studying the use of WinForm's custom controls in C #, now you can write yourself to define controls, I think that its proxy mechanism and subscription mechanism are still very nice, then I want to use this part of knowledge in ASP. In .NET, see how the usage of web custom controls is, if you want to know, please look forward to my next report!