forked from javascript-obfuscator/javascript-obfuscator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStringArrayCallsWrapperBase64CodeHelper.ts
More file actions
33 lines (27 loc) · 1.25 KB
/
Copy pathStringArrayCallsWrapperBase64CodeHelper.ts
File metadata and controls
33 lines (27 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { injectable, } from 'inversify';
import { AtobTemplate } from './templates/string-array-calls-wrapper/AtobTemplate';
import { StringArrayBase64DecodeTemplate } from './templates/string-array-calls-wrapper/StringArrayBase64DecodeTemplate';
import { StringArrayCallsWrapperCodeHelper } from './StringArrayCallsWrapperCodeHelper';
@injectable()
export class StringArrayCallsWrapperBase64CodeHelper extends StringArrayCallsWrapperCodeHelper {
/**
* @returns {string}
*/
protected getDecodeStringArrayTemplate (): string {
const atobFunctionName: string = this.randomGenerator.getRandomString(6);
const atobPolyfill: string = this.customCodeHelperFormatter.formatTemplate(AtobTemplate(), {
atobFunctionName: atobFunctionName
});
const selfDefendingCode: string = this.getSelfDefendingTemplate();
return this.customCodeHelperFormatter.formatTemplate(
StringArrayBase64DecodeTemplate(this.randomGenerator),
{
atobPolyfill,
atobFunctionName,
selfDefendingCode,
stringArrayName: this.stringArrayName,
stringArrayCallsWrapperName: this.stringArrayCallsWrapperName
}
);
}
}