ADVobfuscator Documentation

repository·main·Indexed 23 days ago

https://github.com/andrivet/advobfuscator

A C++20 library providing compile-time obfuscation and encryption for strings, byte blocks, and function calls. It leverages constexpr capabilities to protect sensitive data and code logic without requiring external tools or compiler modifications. Key features include AES-128 encryption, compile-time random number generation, and finite state machines for function call obfuscation. Requires a C++20 compatible compiler and Release builds for active obfuscation.

Tokens
674
Snippets
3
Records
8
Agent score
33%

What's inside ADVobfuscator

  1. What is ADVobfuscator?

    main
    ADVobfuscator is a C++20 library designed to generate obfuscated data and code at compile time. It allows for the obfuscation or encryption of strings and blocks of data during compilation, which are then decoded at runtime. It does not require external tools or modifications to the compiler.
  2. Important: Obfuscation requires Release builds

    main

    ADVobfuscator is not compatible with Debug builds.

    Because compilers often ignore inline or constexpr statements and disable optimizations in Debug mode to facilitate debugging, the obfuscation logic will not function correctly. If you compile in Debug mode, strings and data will not be obfuscated. To ensure obfuscation is active, you must use Release builds.

  3. Requirements for ADVobfuscator

    main

    To use ADVobfuscator, ensure your environment meets the following requirements:

    • A C++20 compatible compiler.
    • Support for the C++20 Standard Library (note: some embedded environments may have exceptions).
    • CMake 3.14 (optional, only required if you wish to build the provided examples using CMake).
  4. Build examples on Linux and macOS using CMake

    main

    To build the examples on Linux or macOS, use the following commands to create a build directory and compile the project:

    mkdir -p BUILD
    cd BUILD
    cmake -DCMAKE_BUILD_TYPE=Release ..
    cmake --build .

    Each example is located in its own subdirectory within the BUILD folder (e.g., ./example/demo).

  5. Reference: ADVobfuscator Library Headers

    main

    The following headers are available in the include/advobfuscator directory for different obfuscation tasks:

    HeaderDescription
    aes.hObfuscation using AES-128 compile time encryption
    aes_string.hObfuscated strings using AES-128 compile time encryption
    bytes.hObfuscated blocks of bytes
    fsm.hCompile time finite state machine to obfuscate function calls
    obj.hObfuscation
    random.hGenerate random numbers at compile time
    string.hObfuscated strings
    format.hstd::format Formatting of strings