L
Linda
I'm I'm trying to compare 2 hash values using sha1 one written in vb.net
and the other in Python.
The value I get in my vb.net code does not match the python code, or any
other hash calulator I have used.
Here is the .net code:
-----------------------------------------------
Dim UE As New UnicodeEncoding
Dim SHAhash As New SHA1Managed
Dim SHA1HASHValue() As Byte
Dim MessageBytes As Byte() = UE.GetBytes(TB_Input.Text)
SHA1HASHValue = SHAhash.ComputeHash(MessageBytes)
Dim b As Byte
Dim strHex As String
For Each b In SHA1HASHValue
strHex += String.Format("{0:x2}", b)
Next
LB_Output.Text = strHex
and the other in Python.
The value I get in my vb.net code does not match the python code, or any
other hash calulator I have used.
Here is the .net code:
-----------------------------------------------
Dim UE As New UnicodeEncoding
Dim SHAhash As New SHA1Managed
Dim SHA1HASHValue() As Byte
Dim MessageBytes As Byte() = UE.GetBytes(TB_Input.Text)
SHA1HASHValue = SHAhash.ComputeHash(MessageBytes)
Dim b As Byte
Dim strHex As String
For Each b In SHA1HASHValue
strHex += String.Format("{0:x2}", b)
Next
LB_Output.Text = strHex