Hackvent_2018/Day 18/src/hackvent2018/evil/EvilEvent.java
Roman Hergenreder 6df7db7cb7 Whatver
2018-12-20 14:52:00 +01:00

32 lines
850 B
Java

//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package hackvent2018.evil;
public class EvilEvent {
private static byte[] b = new byte[]{-83, 8, 119, 19, 73, 17, 2, 83, 126, 17, 33, 119, 115, 6, 38, 16, 26, 23, 10, 127, 20, 85, 81, 47, 13, 88, 43, 0, 70, 27, -122, 8, 83, 17, 125, 46, 78, 64, 89, 78, 41};
public EvilEvent() {
}
static String eventResult() {
byte[] x = xor(b, NotEvil.b, 0);
x = xor(x, Evil.b, 100);
x = xor(x, Sad.b, 200);
x = xor(x, Question.b, 300);
return new String(x);
}
private static byte[] xor(byte[] c, byte[] b, int offset) {
byte[] x = new byte[c.length];
for(int i = 0; i < c.length; ++i) {
x[i] = (byte)(c[i] ^ b[i + offset]);
}
return x;
}
}