> For the complete documentation index, see [llms.txt](https://easyauth.papelship.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://easyauth.papelship.com/documentation/overview.md).

# OVERVIEW

This guide will walk you through setting up EasyAuth in a new or existing C++ project in under 5 minutes.

## &#x20;Prerequisites

Before integrating EasyAuth, ensure you have:

* **IDE**: Visual Studio 2022 (v143 toolset recommended).
* **Language Standard**: C++17 or higher (`/std:c++17` or `/std:c++20`).
* **Platform**: Windows x64 (Release configuration recommended).
* **Product API Key**: Created from your EasyAuth Web Dashboard / Server (`pk_...`).

## Step-by-Step Integration

{% stepper %}
{% step %}

### Copy Include & Lib Files

Place the following files in your project directory:

```
YourProject/
├── include/
│   ├── qPapelEasyAuth.h
│   ├── PluginManager.h
│   └── obfuscate.h
└── lib/x64/Release/
    ├── qPapelEasyAuth.lib
    └── libsodium.lib
```

{% endstep %}

{% step %}

### Configure Visual Studio Project Properties

1. Open your project's **Properties** in Visual Studio.
2. Set **Configuration** to `Release` and **Platform** to `x64`.
3. Under **C/C++ -> General**:
   * Add `include;` to **Additional Include Directories**.
4. Under **C/C++ -> Language**:
   * Set **C++ Language Standard** to `ISO C++17 Standard (/std:c++17)`.
5. Under **Linker -> General**:
   * Add `lib\x64\Release;` to **Additional Library Directories**.
6. Under **Linker -> Input**:
   * Add `qPapelEasyAuth.lib;libsodium.lib;` to **Additional Dependencies**.
     {% endstep %}

{% step %}

### Write the Authentication Code

```cpp
#include "qPapelEasyAuth.h"
#include <iostream>
#include <windows.h>

int main() {
    // 1. Configure EasyAuth features
    easyauth::config cfg;
    cfg.flags = easyauth::flag_all;        // Enable all anti-debug & anti-tamper flags
    cfg.honeypot_delay_ms = 5000;          // Stealth delayed ban for memory scanners
    cfg.vmp_mode = false;                  // Enable if using VMProtect SDK
    easyauth::set_config(cfg);

    // 2. Initialize protection engine
    easyauth::initialize();

    // 3. Connect to the EasyAuth cluster
    std::cout << "[*] Connecting to EasyAuth...\n";
    if (!easyauth::network_connect()) {
        std::cerr << "[-] Network error: Cannot reach authentication server.\n";
        Sleep(3000);
        return 1;
    }

    // 4. Initialize encrypted session
    std::string api_key = "pk_your_api_key_here";
    auto init_res = easyauth::init_session(api_key);
    if (!init_res.success) {
        std::cerr << "[-] Session Init Failed: " << init_res.message << "\n";
        Sleep(3000);
        return 1;
    }

    // 5. Authenticate user's license key
    std::string user_key;
    std::cout << "Enter License Key: ";
    std::cin >> user_key;

    auto auth_res = easyauth::authenticate(user_key, api_key);
    if (!auth_res.success) {
        std::cerr << "[-] Authentication Failed: " << auth_res.message << "\n";
        Sleep(3000);
        return 1;
    }

    std::cout << "[+] Authentication Successful!\n";
    std::cout << "[+] License Expiration : " << auth_res.expire_date << "\n";

    // Your protected application logic begins here...
    return 0;
}
```

{% endstep %}
{% endstepper %}

{% hint style="info" %}
**Next Steps**: Check out [Installation & Project Setup](broken://pages/4a556ee5d07d081d67d19ab702635d924c88929b) for advanced linker options and [Core Functions](file:///3232689/core-functions/configuration-lifecycle.md) for full API reference.
{% endhint %}
