PreEmptive Protection - DashO v8.2 User Guide

Using Custom Encryption

You can configure PreEmptive Protection - DashO to use your own encryption algorithms to deal with the strings found during the string encryption phase. The implementation can be as simple or complex as you desire. Please keep in mind however, that a long running decryption method will ultimately slow down your application. There are two parts to this process: Encryption and Decryption. The encryption method is used when DashO processes the project. The encryption class and method need to be packaged in a separate jar and configured to be used by the project. The decryption method is packaged with the application. The decryption class and method need to be part of the inputs of the project and be configured to be used by the project.

Encryption

The encryption algorithm must be in a public static method that takes a single string, the plaintext, as an argument and returns an array of two non-null strings, the key and the ciphertext.

public static String[] encrypt (String plainText) {
    String key = {however you want to determine it};
    String cipherText = {however you want to create it};
    return new String[]{key,cipherText};//The order is important!
 }

Decryption

The decryption algorithm must be in a public static method that takes two strings, the key and ciphertext, as arguments and returns a single non-null string, the plaintext. It must be able to properly decrypt the ciphertext created by the encryption method.

public static String decrypt (String key, String cipherText) {
    String plainText = {however you want to determine it};
    return plainText;
 }

Note:

The decryption class can still be renamed, and obfuscated, but it will be excluded from custom string encryption. If your decryption class uses other classes in your input, you may need to manually exclude them from string encryption to avoid an infinite recursive call at runtime. Custom Encryption is not supported in Quick Jar projects.

PreEmptive Protection - DashO Version 8.2.0. Copyright © 2017 PreEmptive Solutions, LLC