package net.branchlock.layout.demo;

import java.util.ArrayList;
import java.util.List;

public class InteractiveDemo {
    private static final double PI = 3.14159;
    private final String secretAPIKey;
    private final int mode;
    private final List<Double> circleRadii = new ArrayList<Double>();

    public InteractiveDemo(String secretAPIKey, int mode) {
        this.secretAPIKey = secretAPIKey;
        this.mode = mode;

    public static void main(String[] args) {
        InteractiveDemo interactiveDemo = new InteractiveDemo("0f4d58642c9bcfc1ee71c6c2483f462a", 1);

    public void retrieveRadii() {
        try {
            String line;
            URL url = new URI("" + this.secretAPIKey).toURL();
            BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
            while ((line = reader.readLine()) != null) {
        catch (Exception e) {
            throw new RuntimeException("Failed to retrieve circle radii from server. ", e);

    private void calculateResults() {
        double result = switch (this.mode) {
            case 0, 1 -> {
                double radius;
                int i;
                System.out.println("Summing areas...");
                double sum = 0.0;
                for (i = 0; i < this.circleRadii.size(); ++i) {
                    radius = this.circleRadii.get(i);
                    sum += 3.14159 * radius * radius;
                yield sum;
            case 2 -> {
                double radius;
                int i;
                System.out.println("Summing circumferences...");
                double sum = 0.0;
                for (i = 0; i < this.circleRadii.size(); ++i) {
                    radius = this.circleRadii.get(i);
                    sum += 6.28318 * radius;
                yield sum;
            default -> throw new IllegalArgumentException("Invalid mode: " + this.mode);
        System.out.println("Result: " + result);

Our Strengths


Leveraging our extensive experience, we've developed the most robust methods and algorithms to ensure the highest level of security for your Java, Kotlin, and Android applications. Our technology, Branchlock, is designed to hinder decompilers, making them a futile effort.


Experience the simplicity of Branchlock's user-friendly interface. Encrypt your program without the need for complex configuration files or extensive documentation. We've designed Android and Java obfuscation to be as straightforward as possible.


Stay ahead with our automatic updates. We handle the server-side updates, so you don't need to worry about downloading anything. Regular updates ensure our top-notch security and promptly address any bugs you encounter.


Our obfuscator is online, eliminating the need for powerful hardware. Encrypt a 20MB file in under half a minute with our service.


We understand the cost associated with quality obfuscators. That's why we've made our product accessible to small developers, maintaining a high level of security.


Our dedicated support team is available to assist you. If you have any questions or concerns, don't hesitate to reach out to us.



Enhanced protection via dynamic encryption keys passed at runtime, bolstering security against static decryption methods.

Control Flow Obfuscation

Changes the logical code structure to a less understandable one for humans and decompilers.

Debug Detection

Checks if the application is being debugged and terminates the application if it is.

Root Detection

Checks if the android device is rooted and terminates the application if it is.

Number Encryption

Converts integer and non-integer numbers into complex arithmetic operations.

Runtime Class Wrapper

Encapsulates Java runtime classes within wrapper classes to obfuscate them.

Crash Reverse Engineering Tools

Uses different methods & exploits to crash reverse engineering tools.

Member Shuffler

Rearranges the members of classes to make the code less intuitive.

Stacktrace Encryption

Encrypts line numbers and source file information in stacktraces.

String Encryption

Encrypts all strings and makes them illegible & non-searchable.

Unify Member Visibility

Changes the visibility of class members to public.

Logic Scrambler

Scrambles code but maintains performance and size.

Reference Encryption

Replaces method invocations and field references.

Code Trimmer

Removes unused methods and fields from classes.

Debug Information Remover

Removes as much debug information as possible.

Method Merger

Merges static methods into one method.

Member Renamer

Renames class names and members.