BogaNet 1.4.0
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
BogaNet.Util.Obfuscator Class Referenceabstract

Obfuscator for strings and byte-arrays. NOTE: this class is not cryptographically secure! More...

Static Public Member Functions

static byte GenerateIV ()
 Generates a secure IV for the obfuscation.
 
static byte[] Obfuscate (byte[] data, byte IV=DEFAULT_IV)
 Obfuscate a byte-array.
 
static byte[] Obfuscate (string data, byte IV=DEFAULT_IV, Encoding? encoding=null)
 Obfuscate a string.
 
static byte[] Deobfuscate (byte[] obfuscatedData, byte IV=DEFAULT_IV)
 De-obfuscate a byte-array.
 

Detailed Description

Obfuscator for strings and byte-arrays. NOTE: this class is not cryptographically secure!

Member Function Documentation

◆ Deobfuscate()

static byte[] BogaNet.Util.Obfuscator.Deobfuscate ( byte[] obfuscatedData,
byte IV = DEFAULT_IV )
static

De-obfuscate a byte-array.

Parameters
obfuscatedDatabyte-array to de-obfuscate
IVInitial-Vector byte (optional)
Returns
De-obfuscated byte-array
Exceptions
ArgumentNullException

◆ GenerateIV()

static byte BogaNet.Util.Obfuscator.GenerateIV ( )
static

Generates a secure IV for the obfuscation.

Returns
IV as byte

◆ Obfuscate() [1/2]

static byte[] BogaNet.Util.Obfuscator.Obfuscate ( byte[] data,
byte IV = DEFAULT_IV )
static

Obfuscate a byte-array.

Parameters
databyte-array to obfuscate
IVInitial-Vector byte (optional)
Returns
Obfuscated byte-array
Exceptions
ArgumentNullException

◆ Obfuscate() [2/2]

static byte[] BogaNet.Util.Obfuscator.Obfuscate ( string data,
byte IV = DEFAULT_IV,
Encoding? encoding = null )
static

Obfuscate a string.

Parameters
datastring to obfuscate
IVInitial-Vector byte (optional)
encodingEncoding of the string (optional, default: UTF8)
Returns
Obfuscated string
Exceptions
ArgumentNullException

The documentation for this class was generated from the following file: