Obfuscation

XOR-based obfuscation over a fixed-size key, applied to byte ranges.

Synopsis

Declared in <util/obfuscation.h>

class Obfuscation;

Type Aliases

NameDescription
KeyType Unsigned integer type holding one obfuscation key word.

Member Functions

NameDescription
Obfuscation [constructor]Constructors
HexKey Return the key as a hex string.
Serialize Serialize the key as a length-prefixed byte vector.
Unserialize Read the key from a length-prefixed byte vector, throwing on a wrong size.
operator() Obfuscate (or de-obfuscate) a byte range in place by XORing it with the key.
operator bool Test whether the obfuscation is active.

Static Data Members

NameDescription
KEY_SIZE Size of the obfuscation key in bytes.

Non-Member Functions

NameDescription
dbwrapper_private::GetObfuscationWork around circular dependency, as well as for testing in dbwrapper_tests. Database obfuscation should be considered an implementation detail of the specific database.