A
atakan
Hi
I'm trying to hash a password by using SHA256Managed but it returns wrong
hash.
for "123123" the SHA256 must return
"96cae35ce8a9b0244178bf28e4966c2ce1b8385723a96a6b838858cdd6ca0a1e" but it
returns
"eUFcNsFFljNAhC8b5OnauOs0o0txyAUB/b0QTmDRTN0="
Why this difference occurs in SHA256Managed namespace ?
the code I used is below
Dim txtPass As String
Dim HashValue() As Byte
Dim UE As New System.Text.UnicodeEncoding
Dim ContentBytes As Byte()
Dim oSHA As New SHA256Managed
ContentBytes = UE.GetBytes(txtPassword.Text.ToString)
HashValue = oSHA.ComputeHash(ContentBytes)
txtPass = Convert.ToBase64String(HashValue)
regards
Atakan
I'm trying to hash a password by using SHA256Managed but it returns wrong
hash.
for "123123" the SHA256 must return
"96cae35ce8a9b0244178bf28e4966c2ce1b8385723a96a6b838858cdd6ca0a1e" but it
returns
"eUFcNsFFljNAhC8b5OnauOs0o0txyAUB/b0QTmDRTN0="
Why this difference occurs in SHA256Managed namespace ?
the code I used is below
Dim txtPass As String
Dim HashValue() As Byte
Dim UE As New System.Text.UnicodeEncoding
Dim ContentBytes As Byte()
Dim oSHA As New SHA256Managed
ContentBytes = UE.GetBytes(txtPassword.Text.ToString)
HashValue = oSHA.ComputeHash(ContentBytes)
txtPass = Convert.ToBase64String(HashValue)
regards
Atakan