Here is my Hash code:
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.
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