Watermarking
PreEmptive Protection™ DashO™ for Android & Java can watermark your software. Watermarking is used to unobtrusively embed data into an application without impacting its runtime behavior. There are two different ways to watermark your application: you can configure DashO to apply the watermark when processing classes on the PreMark™ page of the DashO GUI, or you can use the PreMark command line utility.
Note: Watermarking cannot be used in Android Mode.
A watermark configured in the DashO GUI will be applied to each jar output by DashO. It cannot be applied to a directory or an APK, and it is unlikely to be the best option if you want to vary the watermark across different copies of the software that you are distributing. It may be suitable for information such as a copyright.
The PreMark command line utility places watermarks on existing jars. The jar does not need to be DashO-obfuscated for this to work. You could easily apply a different watermark, such as a serial number, to each copy of the jar in order to make it traceable.
Watermarking Options
The following options are configurable whether you are using the DashO GUI or the PreMark Command Line Utility.
Watermark
The watermark is the String of characters embedded into the output jar. The watermark may contain any of the characters specified in the chosen Character Map.
Overflow Behavior
The size of the watermark that can be placed on a jar (i.e., the number of characters) depends on several factors:
- The size and complexity of the jar.
- The size of the Character Map being used.
- Whether or not you encrypt the watermark with a passphrase.
DashO cannot determine whether or not a watermark is feasible until an output jar is generated. If a jar cannot support the specified watermark String, you can configure DashO to either halt the build with an error message, or truncate the watermark, using as many characters as possible, and issue a warning message.
Character Map
DashO defines five different character maps for PreMark, each one of which offers a different set of characters. More complex character sets require more bits-per-character and therefore don't allow you to use as many characters in your watermark as you might be able to use with simpler character maps.
Description (used in GUI) | Name (Used in Project File/PreMark Command Line Utility) | Included Characters | Bits/Character |
---|---|---|---|
6 bit Uppercase Alphanumeric and symbols | 6bit-a |
ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789!@#$%^&*(){}=+_,./<>?\" |
6 |
6 bit Alphanumeric | 6bit-b |
ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz0123456789 |
6 |
7 bit Alphanumeric and symbols | 7bit-a |
ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(){}=+_,./<>?\"| |
7 |
4 bit Hexadecimal | 4bit-a |
0123456789ABCDEF |
4 |
UTF-8 | utf8 |
Any Character | 8 |
Passphrase
You can specify a passphrase to encrypt and decrypt the watermark. Using a passphrase will cause the watermark to require more space, and can reduce the number of characters that you can fit in your watermark for a given jar. The encryption algorithm has a fixed block size - increasing the length of the passphrase will not reduce the number of available characters.