public Sub hex_decode(pData As String) As String
Dim x As Int, res As String, h As String, d As Int, b(1) As Byte, c As String
Log("hex_decode :pData len = " & pData.Length)
Try
For x = 0 To (pData.Length-1) Step 2
' // get hex byet
h = su.Mid(pData, x, 2)
' // get int value
b(0) = Bit.ParseInt(h,16)
c = bc.StringFromBytes(b,"WINDOWS-1251")
Log(h & " " & b(0) & " " & Asc(c))
res = res & c
Next
Catch
res = ""
End Try
Log(res)
Log("hex_decode :res len = " & res.Length)
Return res
End Sub