i have a web site that registers a account using this info. I'd like the make my program in vb.net also make it the same way but i cant seem to do it.
$salt = 'phoohie1yaihooyaequae7PuiWoeNgahjieth3ru3yeeghaepahb7aeYaipe2we6zii6mai6uweig8siasheinoungeoyeiLohS hi2xoh2xi8ooxee9ahpiehahc9Phe'
echo hash("sha256", "dein username".$salt."dein passwort");
here what i get with the web site and i need my program to get the same thing.
user: test123
pass: test123
76ddc726175cf1594ba5afea07b263bdc2fceb89f4e78e4514c26496415356d9
the only code i can find for this
help please.
$salt = 'phoohie1yaihooyaequae7PuiWoeNgahjieth3ru3yeeghaepahb7aeYaipe2we6zii6mai6uweig8siasheinoungeoyeiLohS hi2xoh2xi8ooxee9ahpiehahc9Phe'
echo hash("sha256", "dein username".$salt."dein passwort");
here what i get with the web site and i need my program to get the same thing.
user: test123
pass: test123
76ddc726175cf1594ba5afea07b263bdc2fceb89f4e78e4514c26496415356d9
the only code i can find for this
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim strText As String = TextBox1.Text
Dim salt As String = TextBox2.Text
Dim bytHashedData As Byte()
Dim encoder As New UTF8Encoding()
Dim md5Hasher As New SHA256CryptoServiceProvider
' Get Bytes for "password"
Dim passwordBytes As Byte() = encoder.GetBytes(strText)
' Get Bytes for "salt"
Dim saltBytes As Byte() = encoder.GetBytes(salt)
' Creat new Array to store both "password" and "salt" bytes
Dim passwordAndSaltBytes As Byte() = _
New Byte(passwordBytes.Length + saltBytes.Length - 1) {}
' Store "password" bytes
For i As Integer = 0 To passwordBytes.Length - 1
passwordAndSaltBytes(i) = passwordBytes(i)
Next
' Append "salt" bytes
For i As Integer = 0 To saltBytes.Length - 1
passwordAndSaltBytes(i + passwordBytes.Length) = saltBytes(i)
Next
' Compute hash value for "password" and "salt" bytes
bytHashedData = md5Hasher.ComputeHash(passwordAndSaltBytes)
' Convert result into a base64-encoded string.
Dim hashValue As String
hashValue = Convert.ToBase64String(bytHashedData)
TextBox3.Text = (hashValue.ToString)
End Sub