recompiled code - translation?

hello everybody out there,

I have a little , but hard problem. I recompiled a class and everything is running fine, but one method was not really goog recompiled and it llok like a mix of VM-Instruction-code, assembler and java.

May someone can translate

Here is it:

privatestatic String method11(String s){

char ac[];

int i;

int j;

ac = s.toCharArray();

i = ac.length;

j = 0;

goto _L1

_L9:

ac;

j;

JVM INSTR dup2 ;

JVM INSTR caload ;

j % 5;

JVM INSTR tableswitch 0 3:default 72

0 52

1 57

2 62

3 67;

goto _L2 _L3 _L4 _L5 _L6

_L3:

0x26;

goto _L7

_L4:

60;

goto _L7

_L5:

12;

goto _L7

_L6:

67;

goto _L7

_L2:

70;

_L7:

JVM INSTR ixor ;

(char);

JVM INSTR castore ;

j++;

_L1:

if(j < i)goto _L9;elsegoto _L8

_L8:

returnnew String(ac);

}

thanks

regards

[1758 byte] By [swingfreak] at [2007-9-26 4:50:40]
# 1

I'll give it a shot!

private static String method11(String s) {

char[] ac = s.toCharArray();

int i = ac.length;

for (int j = 0; j < i; j++) {

int x;

switch (j % 5) {

case 0: x = 0x26; break;

case 1: x = 60; break;

case 2: x = 12; break;

case 3: x = 67; break;

default: x = 70; break;

}

ac[j] ^= x;

}

return new String(ac);

}

This method encrypts/decrypts a String by XORing the characters in the String with a set of five numbers.

schapel at 2007-6-29 18:42:11 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2
thanks I'm gonna try thisregards
swingfreak at 2007-6-29 18:42:11 > top of Java-index,Java HotSpot Virtual Machine,Specifications...