literal number values to hex convert

This commit is contained in:
sanex3339
2016-05-21 15:03:40 +03:00
parent dde53c79bf
commit 4d9f30c642
7 changed files with 44 additions and 14 deletions
+4
View File
@@ -14,6 +14,10 @@ class NodeObfuscator {
node.name = namesMap.get(node.name);
}
}
replaceLiteralNumberByHexadecimalValue(nodeValue) {
const prefix = '0x';
return `${prefix}${Utils_1.Utils.decToHex(nodeValue)}`;
}
replaceLiteralStringByArrayElement(nodeValue) {
let value = Utils_1.Utils.stringToUnicode(nodeValue), unicodeArray = this.nodes.get('unicodeArrayNode').getNodeData(), sameIndex = unicodeArray.indexOf(value), index;
if (sameIndex < 0) {