r/javahelp • • May 18 '19

Help

can someone help me understand what this means? or what will it return.

public String getKey(String identifier, String secret, String unique)

throws Exception

{

return "'" + identifier + secret + unique + unique.charAt(0) + "',$21,'" + secret.charAt(2) + unique.charAt(1) + unique.charAt(3) + secret.charAt(0) + secret.charAt(4) + "iaM" + unique.charAt(2) + "',$20,'" + secret.charAt(3) + "',14,6,'D" + secret.charAt(1) + "Z&" + unique.charAt(5) + "',6,'1B" + unique.charAt(4) + "%'";

}

0 Upvotes

3 comments sorted by

1

u/AnEmortalKid Coffee Enthusiast May 18 '19

It returns a String. That string is made up of a bunch of the parts from the input.

1

u/desrtfx Out of Coffee error - System halted May 18 '19

Work it through on paper.

We cannot tell what it will return because it depends on the parameters of the method.

1

u/Daneel_Trevize Competent Dev May 18 '19

It means someone wrote a horrific key generating method, probably as a part of their own ineffective 'encryption' mechanism. The Romans had better stuff than this. Ignore it if you can.