We will be at OWASP APPSEC EUROPE 2017 - Belfast! Let’s talk!MORE INFO

Help Center

Get to know more about our API, Code Annotations and Code Transformations

Extend Predicates

Potency
0 / 3
Resilience
0 / 5
Cost
0 / 5

Tags: opaque predicates,predicates

Description

A predicate is an expression that evaluates to either true or false.
This transformation extends the predicates in your code with opaque predicates
making them harder to understand.

Examples

The following example is a while statement with a simple predicate:

1
2
3
4
var i = 0;
while (i < 10) {
i++;
}

After extending the predicate i < 10 the resulting predicate becomes harder
to understand. The following example is a possible output:

1
2
3
4
5
var i = 0, j = 10;
while (i < 10 && (j * j * (j + 1) % 2 === 0)) {
i++;
j = i * j - 1;
}

API Parameters

Example:

1
2
3
4
5
6
7
8
9
10
11
12
{
"keys": {
"accessKey": "XXXXXX",
"secretKey": "YYYYYY"
},
"applicationId": "ZZZZZZ",
"params": [
{
"name": "extendPredicates"
}
]
}