String Concealing

Potency High
Resilience Medium
Cost Medium
Tags: string, conceal, obfuscation

Description

Consider the following variable declarations holding string literal values:

var protocol = 'http';
var domain = 'jscrambler.com';
var url = protocol + '://' + domain;

The code will look something like this after transformation:

var o = {
  f: function() { /* decoding algorithm and encoded data */ }
}
var protocol = o.f(13);
var domain = o.f(32);
var url = protocol + o.f(7) + domain;

Consider using Identifiers Renaming to remove the remaining information that is useful for a human to understand what the variables mean, forcing the user to debug the code in run-time.

Code Annotation Example

// @jscrambler enable stringConcealing

Option Types

Name Required Default Value Description
freq No 1 Probability of applying the transformation when the node allows for the transformation to happen.
min No N/A Minimum number of times the transformation is applied to each JavaScript file. This number may still not be reached if there are not enough candidates to apply the transformation to.
max No -1 Maximum number of times the transformation is applied to each JavaScript file.

Browser Compatibility

Browser Compatible Versions Tested Versions Notes
Chrome 40+ 40+
Firefox 50+ 40+
Internet Explorer 8+ 8+
Microsoft Edge 18+ 18+
Safari 10.1+ 10.1+

API Parameters

Example:

{
  "keys": {
    "accessKey": "XXXXXX",
    "secretKey": "YYYYYY"
  },
  "applicationId": "ZZZZZZ",
  "params": [
    {
      "name": "stringConcealing",
      "options": {}
    }
  ]
}