我在想,是否有人能以正确的方向指导我如何加密VB.net中Windows窗体给出的密码。我对编程非常陌生,因此某些专业术语可能没有意义。我还将用户名和密码存储在访问数据库中。应该加密吗?如果可以,怎么办?或者我应该在按Enter键之前对密码进行加密,以便存储加密的值?任何帮助或信息将不胜感激。我会尽快回答您可能遇到的任何问题,以便为您提供更多信息。我现在将提供我的代码,(因为我认为它没有相关性)::::::
导入System.Data.OleDb 导入System.Data
公共类Form3
Private Sub Form3_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
Private Sub Label4_Click(sender As Object, e As EventArgs) Handles Label4.Click
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
If TextBox2.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Then
MsgBox("Please Complete All Fields")
Else
Try
Dim conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\Computer Science\CA\tyre_stock_database_21.accdb")
Dim insert As String = "Insert into login_info values('" & TextBox1.Text & "','" & TextBox2.Text & "');"
Dim cmd As New OleDbCommand(insert, conn)
conn.Open()
cmd.ExecuteNonQuery()
MsgBox("Account Successfully Created")
Me.Close()
Catch ex As Exception
MsgBox(String.Format("Error: {0}", ex.Message))
End Try
End If
End Sub
结束班级