Click or drag to resize

UtilSimpleObfuscator Class

Provides methods for obfuscating and deobfuscating text using a simple reversible transformation.
Inheritance Hierarchy
SystemObject
  QsInformatica.UtilsUtilSimpleObfuscator

Namespace: QsInformatica.Utils
Assembly: QsInformatica.Utils (in QsInformatica.Utils.dll) Version: 28.0.0
Syntax
public static class SimpleObfuscator

The UtilSimpleObfuscator type exposes the following members.

Methods
 NameDescription
Public methodStatic memberDeobfuscate Decodes an obfuscated string by reversing the obfuscation process.
Public methodStatic memberObfuscate Obfuscates the specified plain text by applying a reversible transformation.
Top
Remarks
The UtilSimpleObfuscator class applies a basic XOR-based transformation combined with Base64 encoding to obfuscate text. It is designed for lightweight obfuscation and is not suitable for secure encryption. Use this class only for scenarios where minimal obfuscation is sufficient, such as hiding non-sensitive data.
Example
To manually obfuscate a string using PowerShell and the same algorithm:
PowerShell
$t="secret"; $b=[Text.Encoding]::UTF8.GetBytes($t); $kb=[Text.Encoding]::UTF8.GetBytes("QS1994!"); 0..($b.Length-1)|%{$b[$_]=$b[$_] -bxor $kb[$_ % $kb.Length]}; [Convert]::ToBase64String($b)
See Also