I want to convert a vb function to Android java and I want results as same as VB only .
below is the function.
Function GetChallengeResponse(ChByt0 As String, ChByt1 As String, ChByt2 As String, ChByt3 As String) As String
Dim num1 As Long
Dim num2 As Long
Dim arg1 As Byte
Dim arg2 As Byte
Dim arg3 As Byte
Dim arg4 As Byte
arg1 = CByte("&H" & ChByt0)
arg2 = CByte("&H" & ChByt1)
arg3 = CByte("&H" & ChByt2)
arg4 = CByte("&H" & ChByt3)
(((F3+06+50) ^ F3)+41) * 16
num2 = (((arg4 + arg3 + arg1) Xor arg4) + arg2) * 16
If num2 >= 256 Then
num2 = CLng("&H" & Mid(StrReverse(Hex(num2)), 1, 3))
End If
num1 = (((arg4 + arg3 + arg2) Xor arg3) + arg1) * 16
If num1 >= 256 Then
num1 = CLng("&H" & Mid(StrReverse(Hex(num1)), 1, 3))
End If
GetChallengeResponse = CStr(num1) & " " & CStr(num2)
End Function