Configurations
Keep your settings in an RR file and upload it with each build.
The API takes two files: your compiled Jar and a UTF8 RR configuration. There is no configuration ID to create or select. Name the configuration cat.rr, release.rr or any other filename.
An API configuration
Download this example and edit the engine block. Keep format 1 and the Lithium profile declaration. The API assigns input, output and workspace paths inside each job, so local Windows paths are unnecessary.
Download api.rrformat 1;
use "lithium";
engine ^ {
skipFlow false;
skipString false;
skipArithmetic false;
linkedIndy true;
chainedControlFlow true;
stringProtectionProfile "strong";
}Use false for skipFlow, skipString and skipArithmetic to enable those passes. Set a skip option to true to leave that part unchanged. Positive controls such as linkedIndy and chainedControlFlow use true to enable the feature.
Server-controlled settings
The worker enables bytecode verification, disables application smoke runs and signing, and uses a 90 second engine budget. A separate validation block and a local buildWorkspace are not accepted. Native protection and unsupported advanced options return an error rather than being silently ignored.
Files and identifiers
Upload the Jar as file and the RR file as config. The returned id identifies that build only. The configHash identifies the uploaded file contents; it is not a configuration ID and is not sent in later uploads. To change protection, edit your RR file and submit both files again.
The Lithium profile
format 1; selects the RR syntax version. use "lithium"; loads the defaults bundled with your engine. Lithium is a base profile, not a separate configuration file you need to download.
Settings omitted from this file still inherit their values from Lithium. The bundled profile selects Java protection and disables native virtualization. Its defaults can differ between engine versions.
engine ^ overrides inherited engine settings. The caret is required when replacing a value supplied by the profile. Command line overrides take precedence over the file.
The extended catolog.rr preset
This extended example contains local engine settings. The API overrides its time budget and safety settings. Download the file or copy it below. For a local build, update input and output to your Jar paths. The seed is already supplied.
format 1;
use "lithium";
project {
input "hi.jar";
output "hi-obf.jar";
seed "96be4325b54ce68bb498693f97c42d82d78d7436e79501f5abd45ece9191befe";
}
engine ^ {
dictionary "MORVAY_UNICODE";
skipReflection false;
skipConstructorIndy false;
packageRoot "hashira";
expressionSteps 0;
expressionClasses 5;
compactAppearance true;
decimalAppearance true;
linkedIndy true;
chainedControlFlow true;
aggressiveFlow true;
bozarFlow true;
bozarConst true;
skipFlow false;
skipString false;
skipArithmetic false;
stringProtectionProfile "strong";
appearanceMethod "";
appearanceText "اللَّهُ لَا إِلَٰهَ إِلَّا هُوَ الْحَيُّ الْقَيُّومُ ۚ لَا تَأْخُذُهُ سِنَةٌ وَلَا نَوْمٌ ۚ لَهُ مَا فِي السَّمَاوَاتِ وَمَا فِي الْأَرْضِ ۗ مَنْ ذَا الَّذِي يَشْفَعُ عِنْدَهُ إِلَّا بِإِذْنِهِ ۚ يَعْلَمُ مَا بَيْنَ أَيْدِيهِمْ وَمَا خَلْفَهُمْ ۖ وَلَا يُحِيطُونَ بِشَيْءٍ مِنْ عِلْمِهِ إِلَّا بِمَا شَاءَ ۚ وَسِعَ كُرْسِيُّهُ السَّمَاوَاتِ وَالْأَرْضَ ۖ وَلَا يَئُودُهُ حِفْظُهُمَا ۚ وَهُوَ الْعَلِيُّ الْعَظِيمُ";
writeDiagnostics true;
signOutput false;
buildTimeBudgetSeconds 900;
}What this preset changes
Project and naming
input is the source Jar and output is the protected Jar. seed supplies the build seed. dictionary selects MORVAY_UNICODE and packageRoot sets hashira as the renamed package root.
Control flow and calls
skipFlow false enables flow protection. chainedControlFlow, aggressiveFlow and bozarFlow enable the additional flow passes. linkedIndy true enables linked dynamic calls. skipReflection false and skipConstructorIndy false allow their respective reference and constructor call passes.
Strings and arithmetic
skipString false enables string encryption and stringProtectionProfile "strong" selects the Strong profile. skipArithmetic false enables arithmetic protection and bozarConst true enables constant transformation.
expressionSteps 0 sets expression depth to zero. It does not disable every arithmetic pass. expressionClasses 5 sets the expression family count independently.
Appearance and build output
compactAppearance, decimalAppearance, appearanceMethod and appearanceText configure generated helper appearance. The text in this preset is a literal appearance value, not a secret or an encryption key.
writeDiagnostics true enables build diagnostics. signOutput false disables output signing. buildTimeBudgetSeconds 900 sets the build time budget to 15 minutes.
Adjusting protection
For skip controls, false enables the pass and true skips it. Positive controls such as linkedIndy use true to enable the feature. Keep these two conventions separate.
Hardening Level ranges from 0 to 5. Expression depth ranges from 0 to 8. These settings control different transformations and are not a single protection score. More aggressive settings can increase output size, build time and runtime cost.
Preserve names used by reflection, frameworks and external callers through exclusions. Native protection requires a matching runtime and toolchain; enabling it changes the deployment requirements.
The protection guides below list individual option names and supported panel values. Their panel defaults are not the resolved Lithium defaults.
Using the file with the API
Prepare your configuration
Save your protection settings in an RR file such as release.rr. The filename is your choice. The supplied catolog.rr is an example you can rename.
Upload both files
Send your Jar in the file field and your RR file in the config field. No saved configuration ID is required.
Track the build
Use the returned job ID to check progress and download the protected Jar.
curl --fail-with-body "https://api.hashisoft.com/v1/obfuscations" \
--header "Authorization: Bearer $hashirapikey" \
--form "file=@hi.jar" \
--form "config=@release.rr"Each job keeps the uploaded settings. The configHash response field is a SHA256 digest of the uploaded configuration. Editing your local file does not change an existing job.