8
Answers

encryption decryption

Ask a question
dear all i am encrypting my password like this
but dont know how to decrypt

Function HashPassword(ByVal password As String) As String
        Dim hashedPassword As String
        Dim hashProvider As SHA256Managed

        Try
            Dim passwordBytes() As Byte
            Dim hashBytes() As Byte
            passwordBytes = System.Text.Encoding.Unicode.GetBytes(password)
            hashProvider = New SHA256Managed
            hashProvider.Initialize()
            passwordBytes = hashProvider.ComputeHash(passwordBytes)
            hashedPassword = Convert.ToBase64String(passwordBytes)
         
          
        Finally
            If Not hashProvider Is Nothing Then
                hashProvider.Clear()
                hashProvider = Nothing
            End If
        End Try

Answers (8)