Search
K

Constant Encryption

Performance: Medium
🔐
Potency: High
🧠
Resilience: High

Understanding the protection

Constant values are a critical asset of your code. By encrypting the constants you strengthen the security of your application considerably.
By default, this protection will only encrypt Strings, however, on the user panel you can opt to encrypt any primitive value that is part of the .NET language.

Before Obfuscation:

public static void Main(string[] args) {
int i, sum = 0, n;
Console.Write("Enter the Nth Number : ");
n = int.Parse(Console.ReadLine());
for (i = 0; i <= n; i++) {
sum = sum + i;
}
Console.WriteLine("\nSum of N Numbers : " + sum);
Console.ReadLine();
}

After Obfuscation:

public static void Main(string[] args) {
int i, sum = 0, n;
Console.Write(().());
n = int.Parse(Console.ReadLine());
for (i = 0; i <= n; i++) {
sum = sum + i;
}
Console.WriteLine(().() + sum);
Console.ReadLine();
}