1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.ninjasoft.magiccodes.plugins;
18
19 /***
20 * The Texel code from the MU arg. In this representation, the first byte is
21 * plaintext. It gets XORed with the next byte, etc.
22 *
23 * Sample data 1:
24 * 741116071d0709470844030e050d07094743110b09041b1c10111b19045446091d52531606160717455406130f1d1e041a001a060147
25 *
26 * Sample data 2:
27 * 771e070a480c52130807420c42101b0e0f1c5453061b400e4809131644541b4f5316004b0e4302041612135e0c43020f495354440b4f4d18160b484e0118590e4e0b13131752531b071a1908444809171345430c02084b0e571e05004c54060b59541b4f55051c030e054441050010184c4405151541490f4643020f
28 * @author enigma
29 */
30 public class TexelCode implements Plugin {
31 public String getName() {
32 return "Texel Decode";
33 }
34 public String getDescription() {
35 return "The chaining XOR code Texel used in MU";
36 }
37 public boolean usesKey() {
38 return false;
39 }
40 public boolean isInformational() {
41 return false;
42 }
43 public int[] doAction(int[] in, int[] key) {
44 int previous = 0;
45 for (int i=0; i<in.length; i++) {
46 int newValue = (in[i] ^ previous) % 256;
47 previous = newValue;
48 in[i] = newValue;
49 }
50 return in;
51 }
52 }