Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Security.Cryptography
- Imports System.Text
- Public Class Form1
- Private Function h512(ByVal txt As String)
- Dim a() As Byte = Encoding.UTF8.GetBytes(txt)
- Dim b As Byte()
- Dim c As New SHA512Managed
- b = c.ComputeHash(a)
- Dim d As String = ""
- For Each e As Byte In b
- d &= e.ToString("x2")
- Next
- h512 = d
- End Function
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- TextBox2.Text = h512(TextBox1.Text)
- TextBox2.Enabled = True
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement