title: Hash with MD5 in VB.NET
body: <p>So, I got a bit of a problem here, I got a database, a login and a registration, all in different classes, now I need to hash the password in the database and read it out again when logging in, but I don't know how to handle this, I already searched a lot but couldn't find anything useful. </p>
  
  <p>Here is my login class</p>
  
  <pre><code>Imports System.Data
  
  Imports System.Data.SqlClient
  
  Imports System.Data.SqlServerCe
  
  Public Class Login
  
      Inherits System.Web.UI.Page
  
  
      Private Sub LSend_Click(sender As Object, e As System.EventArgs) Handles LSend.Click
  
          If Bibliothek.EntryExists(LNAME.Text, "Username") = False Then
              LNAMELBL.Text = "Name oder Passwort Falsch."
              Exit Sub
          End If
  
          If Bibliothek.EntryExists(LPW.Text, "Passwort") = False Then
              LNAMELBL.Text = "Name oder Passwort Falsch."
              Exit Sub
          End If
          Dim UserN As String = LNAME.Text
          Session("Admin") = Bibliothek.GetValueBool(UserN, "IsAdmin")
          Session("USERNA") = Bibliothek.GetValueBool(UserN, "Username")
  
          Response.Redirect("/TSL/Home.aspx")
      End Sub
      Private Sub REG_Click(sender As Object, e As System.EventArgs) Handles REG.Click
          Response.Redirect("/TSL/Registrierung.aspx")
      End Sub
  
  End Class
  </code></pre>