I have 16 bytes string which im shifting left, after i shift it left, im trying to display result in RichTextbox:
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Dim positiveString As String = "00082B002C421A21B630B934B7B71C9A99"
Dim posBigInt As BigInteger = 0
posBigInt = BigInteger.Parse(positiveString, System.Globalization.NumberStyles.AllowHexSpecifier)
posBigInt = (posBigInt << 1)
RichTextBox1.Text = Hex(posBigInt.ToString)
End Sub
Public Function StrToHex(ByRef Data As String) As String
Dim sVal As String
Dim sHex As String = ""
While Data.Length > 0
sVal = Conversion.Hex(Strings.Asc(Data.Substring(0, 1).ToString()))
Data = Data.Substring(1, Data.Length - 1)
sHex = sHex & sVal
End While
Return sHex
End Function
StrToHex function gives me wrong output, and if i try Hex(posBigInt.ToString) gives me correct output, if value fits up to uint64, therefore Hex() cant fit biginterger