Go vb.net java problem when, plus enough points

Category: Java SE
 
dlj68
2008-10-10 03:27:44

Sponsored Links
A total of two errors:
1, java:
private String toHexString (byte abyte0 [])
{
String s = "" ;;
for (int i = 0; i <abyte0.length; i + +)
{
byte byte0 = abyte0 [i];
String s1 = Integer.toHexString (byte0);
If (s1.length () > 2) Then
s1 = s1.substring (s1.length () - 2);
If ; (s1.length () <2) Then
s1 = "0" + s1;
s = s + s1;
}

return s.toUpperCase ();
}
into vb.net
Private Function toHexString (ByVal abyte0 () As Byte) As String
Dim s As String = ""
For i As Integer = 0 To abyte0. Length - 1
Dim byte0 As Byte = abyte0 (i)
Dim s1 As String = toHexString (byte0)'' '' byte0 Department error, error contents: type "byte" the value can not be converted to a "byte one-dimensional array"
; If s1.Length> 2 Then
s1 = s1.Substring (s1.Length () - 2)
; End If
If s1.Length <2 Then
s1 = "0" + s1
End If
; s = s + s1
Next
; Return s.ToUpper
End Function
2: java
Dim SubKey (2, 16, 48) As Byte
doDES (abyte6, abyte6, SubKey [1], byte1);
after
Dim into vb.net ; SubKey (2, 16, 48) As Byte
doDES (abyte6, abyte6, SubKey (1), byte1)'''' in SubKey (1) an error: index less than the index of the array dimension

be experts to answer these two questions, thank you.

Sponsored Links

zhangxiantian
2008-10-10 03:31:40
bad, not installed VB.net

Dim s1 As String = toHexString (byte0) this should be passed abyte0 right?
fengdeguijihmm
2008-10-10 03:49:29
friendship Bangding it, I hope someone will help you solve the problem
fengerding
2008-10-10 03:51:55
① toHexString parameter is a byte array
If you pass a value of type byte error bound

② SubKey belonging to three-dimensional array
in vb.net not pass SubKey (1) to obtain a two-dimensional array
dianzi07
2008-10-10 04:04:01
Back upstairs, pass the byte0, non abyte0
internetwork
2008-10-10 04:16:46
The first method that can be put into a Hex toHexString method
as toHexString (byte0) = "Hex (byte0)
second you can think of other ways to convert
renl48
2008-10-10 04:28:03
SubKey belonging to three-dimensional array
in vb.net not pass SubKey (1) to obtain a two-dimensional array

via a custom function that you want to solve?
cfbdymg
2008-10-10 04:41:20
Thank you for the discussion, to the sub
Domain and server ip had changed since 8/23/2013. Suspend the user registration and posts for program maintenance.