Advertisement
Guest User

HungVB.Com Make SHA512 Hash Converter

a guest
Sep 22nd, 2021
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.59 KB | None | 0 0
  1. Imports System.Security.Cryptography
  2. Imports System.Text
  3. Public Class Form1
  4.     Private Function h512(ByVal txt As String)
  5.         Dim a() As Byte = Encoding.UTF8.GetBytes(txt)
  6.         Dim b As Byte()
  7.         Dim c As New SHA512Managed
  8.         b = c.ComputeHash(a)
  9.         Dim d As String = ""
  10.         For Each e As Byte In b
  11.             d &= e.ToString("x2")
  12.         Next
  13.         h512 = d
  14.     End Function
  15.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  16.         TextBox2.Text = h512(TextBox1.Text)
  17.         TextBox2.Enabled = True
  18.     End Sub
  19. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement