Property Keys Obfuscation
Potency Low
Resilience Low
Cost Low
Tags: object, literal, string, property, objects, obfuscation
Description
Property Keys Obfuscation transforms object literal's properties into their hexadecimal and/or unicode representation.
Code Annotation Example
Examples
Consider the following example:
var coordinate = {
x: function() { },
y: 10
};
foo.y;
Property keys x
and y
have been replaced by their hexadecimal and/or unicode representations:
var foo = {
'\x78': function() { },
'\x79': 10
};
foo.y;
Option Types
Name | Required | Default Value | Description |
encoding | Yes | ["hexadecimal"] | N/A |
Browser Compatibility
Browser | Compatible Versions | Tested Versions | Notes |
Chrome | 80+ | 80+ | |
Firefox | 90+ | 90+ | |
Internet Explorer | 8+ | 8+ | |
Microsoft Edge | 116+ | 116+ | |
Safari | 13.1+ | 13.1+ | |
API Parameters
Example:
{
"keys": {
"accessKey": "XXXXXX",
"secretKey": "YYYYYY"
},
"applicationId": "ZZZZZZ",
"params": [
{
"name": "propertyKeysObfuscation",
"options": {
"encoding": [
"hexadecimal"
]
}
}
]
}