Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27360

VS 2012 Hashing

$
0
0
Here is my Hash code:

Code:

    Private Function MD5HashString(Input As String, Password As String) As String
        Dim origBytes() As Byte
        Dim newBytes() As Byte
        Dim sFinal As String
        Dim md5 As New MD5CryptoServiceProvider
        origBytes = ASCIIEncoding.Default.GetBytes(Input + Password)
        newBytes = md5.ComputeHash(origBytes)

        sFinal = BitConverter.ToString(newBytes).Replace("-", vbNullString).ToUpper
        Return sFinal.Substring(0, 4) & "-" & sFinal.Substring(4)
    End Function

If I Hash a String to generate a Hashed version of the String, is it possible to "reverse" Hash the String to get the original value? I am wanting to develop a registration key from Hashing Strings, and am wanting to know how secure Hashing is in this situation.

Viewing all articles
Browse latest Browse all 27360

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>