Search…
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:

1
public static void Main(string[] args) {
2
int i, sum = 0, n;
3
Console.Write("Enter the Nth Number : ");
4
n = int.Parse(Console.ReadLine());
5
for (i = 0; i <= n; i++) {
6
sum = sum + i;
7
}
8
Console.WriteLine("\nSum of N Numbers : " + sum);
9
Console.ReadLine();
10
}
Copied!

After Obfuscation:

1
public static void Main(string[] args) {
2
int i, sum = 0, n;
3
Console.Write(().());
4
n = int.Parse(Console.ReadLine());
5
for (i = 0; i <= n; i++) {
6
sum = sum + i;
7
}
8
Console.WriteLine(().() + sum);
9
Console.ReadLine();
10
}
Copied!

Last modified 7mo ago