I have to hash the value using SHA256 algorithm.
Value to be hashed: NIKKI556538684c657633314734696a4d64754736496e62772a2atest
Hashed value should be: 88679eb665c100b66c04770e87f83b1692df2f027c16adb198addfe3bdbe6c1d
The code that I am using to hash is as below:
Dim hashVal As String = ByteArrayToStr(HashValue(StrToByteArray(concatValue)))
Private Function HashValue(ByVal data() As Byte) As Byte()
Dim hash As New SHA256Managed()
Dim result() As Byte
result = hash.ComputeHash(data)
Return result
End Function
Public Function StrToByteArray(ByVal str As String) As Byte()
'Dim encoding As New System.Text.ASCIIEncoding()
'Return encoding.GetBytes(str)
< ...
Go to the complete details ...