Encrypted features in ASP.NET. The name space system.Web.Security contains class FormSauthentication, with a method HashPasswordforStoringInConfigfile. This method can turn the characters provided by the user into garbled and store it. Note that this method cannot be inherited. The following code is to encrypt the data encrypted to the database when making the registration page, the data system.web.security imports system.data imports system.data.sqlclient 'required Name Space Private Sub Button1_Click (BYVAL Sender As System.Object) , ByVal e As System.EventArgs) Handles Button1.Click Dim PassFormate As String '/// EncryptPassword calling function PassFormate = EncryptPassword (uid.Text, "md5")' // or EncryptPassword (uid.Text, "sha1") 'TextBox2.Text = EncryptPassword (uid.Text, "md5")' TextBox3.Text = EncryptPassword (uid.Text, "sha1") '/// these tests we own it' TextBox4.Text = FormsAuthentication.FormsCookieName 'TextBox5. Text = FormsAuthentication.FormsCookiePath 'TextBox6.Text = FormsAuthentication.GetRedirectUrl (uid.Text, True)' FormsAuthentication.SetAuthCookie (uid.Text, True) Dim sql As String = "insert into pwd (uid, pwd) values (@uid, @PWD) "DIM COMM AS SQLCOMMAND = New Sqlcommand (SQL, Conn) Conn () Comm.Parameters.Add (New Sqlparameter (" @ uid ", sqldbtype.char, 16)) Comm .Parameters (" @ uid " ) .Value = uid.text comm.Parameters.add (New Sqlparameter ("@ PWD", SqldbType.char, 1 6)) Comm.Parameters ("@ PWD"). Value = passformate Comm.executeNonQuery () End sub 'defines an encryption function to call.