/** * Returns a string containing an obfuscated Java source code expression * which computes a duplicate from the given array representation of the * original string. * * @param obfuscated the obfuscated array representation of the original * string. * @return a string containing an obfuscated Java source code expression * which computes a duplicate from the given array representation * of the original string. */ public static String java(final long[] obfuscated) { // Create and initialize a string builder to hold the generated Java // source code. final StringBuilder code = new StringBuilder(new ObfuscatedString(new long[] { 0x40a689aec74199d2l, 0x940f59df6246739al, 0xeac3f5c1c8b24e7l, 0x26ad61b79c816e85l, 0xe029757152b7018fl, 0x4bcb4e735462b50bl, 0x74ef10c10b9840dfl, 0xe23006e2bb419942l, 0xdb5b8e08038cdaf3l, 0xa76eb7d6dc563032l, 0xf71d7c27709fcda1l }).toString()); // Append the seed as the first array element of the obfuscated string. // All values are represented in hexadecimal in order to keep the // Java source code as short as possible. appendHexLiteral(code, obfuscated[0]); for (int i = 1; i < obfuscated.length; i++) { appendHexLiteral(code.append(", "), obfuscated[i]); } return code .append(new ObfuscatedString(new long[] { 0x110bbdfd94f21237l, 0x93d3c2da588e670bl, 0xfe2045e196d2d88al, 0x15bbb6fa27199ebel }).toString()) .append(literal(new ObfuscatedString(obfuscated).toString()).replace("*/", "*\\/")) // escape */ in comment .append(new ObfuscatedString(new long[] { 0xde6c380767517324l, 0xd8b1572404e05004l }).toString()) .toString(); }