Witam tworze generator haseł Mysql (hash) i przy naduszeniu buttonu "Generuj" wyskakuje komunikat oraz pojawia się nowa funkcja.
Imports System
Imports System.Text
Imports System.Security.Cryptography
Public Class Form1
Public Function Generatorhash(ByVal str As String) As String
Dim get_h = New SHA1Managed().ComputeHash(New SHA1Managed().ComputeHash(Encoding.UTF8.GetBytes(a)))
Dim pc_h As New StringBuilder(get_h.Length)
For Each pa_p As Byte In get_h
pc_h.Append(pa_p.ToString("X2"))
Next
Return "*" & pc_h.ToString()
End Function
Private Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs)
If CheckBox1.Checked Then
TextBox2.UseSystemPasswordChar = True
Else
TextBox2.UseSystemPasswordChar = False
End If
End Sub
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
TextBox1.Text = Generatorhash(TextBox2.Text)
If TextBox2.Text.Length = Nothing Then
TextBox1.Text = ""
MessageBox.Show("Wpisz hasło do wygenerowania", "Pustę pole", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1)
Else
Button1.Enabled = False : TextBox2.Enabled = False : CheckBox1.Enabled = False
End If
End Sub
Private Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button2.Click
Button1.Enabled = True : TextBox2.Enabled = True : TextBox1.Text = "" : TextBox2.Text = "" : CheckBox1.Enabled = True
End Sub
Private Function a() As Char()
Throw New NotImplementedException
End Function
End Class
Gdzie
Private Function a() As Char()
Throw New NotImplementedException
End Function
Tworzy się jak nadusze Generuj i przy tym jest błąd NotImplementedException - this method or operation is not implemented.
oraz przy odpalaniu programu jest takie coś:
A first chance exeption of type 'System.NotImplementedException' occurred in WindowsApplication.exe
Prosze o pomoc :(