Number Encryption

Encrypts numbers to make them unreadable.

// Given Input
package dev.sim0n.evaluator.test.impl.annotation;

import dev.sim0n.evaluator.Main;
import dev.sim0n.evaluator.test.Test;
import dev.sim0n.evaluator.test.impl.annotation.TestAnnotation;

@TestAnnotation(string="Test", doubleValue=0.36, intValue=36)
public class AnnotationTest
implements Test {
    public void handle() {
        Class<AnnotationTest> clazz = AnnotationTest.class;
        if (clazz.isAnnotationPresent(TestAnnotation.class)) {
            TestAnnotation annotation = (TestAnnotation)clazz.getAnnotation(TestAnnotation.class);
            String value = annotation.string();
            double doubleValue = annotation.doubleValue();
            int intValue = annotation.intValue();
            Main.LOG.println("Testing annotations");
            Main.LOG.println(String.format((String)"%s, %s, %d", (Object[])new Object[]{value, doubleValue, intValue}));
        }
    }
}
// Output
package dev.sim0n.evaluator.test.impl.annotation;

import dev.sim0n.evaluator.Main;
import dev.sim0n.evaluator.test.Test;
import dev.sim0n.evaluator.test.impl.annotation.TestAnnotation;

@TestAnnotation(string="Test", doubleValue=0.36, intValue=36)
public class AnnotationTest
implements Test {
    public static Integer[] hl;

    public void handle() {
        Class<AnnotationTest> clazz = AnnotationTest.class;
        if (clazz.isAnnotationPresent(TestAnnotation.class)) {
            TestAnnotation annotation = (TestAnnotation)clazz.getAnnotation(TestAnnotation.class);
            String value = annotation.string();
            double doubleValue = annotation.doubleValue();
            int intValue = annotation.intValue();
            Main.LOG.println("Testing annotations");
            int n = 24531;
            Object[] objectArray = new Object[hl[(int)4998338555169234899L ^ n].intValue()];
            objectArray[AnnotationTest.hl[(int)340880696606224856L ^ 0x71D9].intValue()] = value;
            objectArray[AnnotationTest.hl[0x75B4 ^ (int)-1126464656387312202L].intValue()] = doubleValue;
            objectArray[AnnotationTest.hl[0x6542 ^ (int)-3569431733545704127L].intValue()] = intValue;
            Main.LOG.println(String.format((String)"%s, %s, %d", (Object[])objectArray));
        }
    }

    public static void hm() {
        int n = 27490;
        hl = new Integer[n ^ (int)6841978598694349670L];
        int n2 = 6672;
        AnnotationTest.hl[0xEE9 ^ (int)5089840174825737961L] = (int)-1211745857729193453L ^ n2;
        int n3 = 20156;
        AnnotationTest.hl[n3 ^ (int)1688809015124971197L] = 0x3528 ^ 0x3528;
        int n4 = 8158;
        AnnotationTest.hl[0x3DC7 ^ 0x3DC5] = (int)-4588840808207081505L ^ n4;
        int n5 = 23771;
        AnnotationTest.hl[(int)-2458596050831668274L ^ 0xBCD] = n5 ^ (int)2846754772474682585L;
    }

    static {
        AnnotationTest.hm();
    }
}

Each time you obfuscate, the encryption classes are built randomly.

Last updated