Installation
You need Visual Studio 2022 or 2026 with the Desktop development with C++ workload.
Add the project (recommended)
Section titled “Add the project (recommended)”- Copy the
eonauthfolder next to your project. - Add the project. In Solution Explorer, right-click the solution → Add → Existing Project…
→
eonauth\EonAuth.vcxproj. - Reference it. Right-click your project → Add → Reference… → tick EonAuth. Visual Studio then builds and links it with your app.
- Include path. View → Property Manager → right-click your project → Add Existing
Property Sheet… →
eonauth\EonAuth.props. (Or addeonauth\includeto C/C++ → Additional Include Directories.) - Language standard. C/C++ → Language → C++ Language Standard: C++17 or newer.
- Runtime library. EonAuth uses the default
/MD(Release) and/MDd(Debug). Keep your project on the same setting.
The Windows libraries it needs (winhttp, bcrypt, crypt32 and others) are linked automatically.
Or add the source files
Section titled “Or add the source files”Add every file in eonauth\src\*.cpp and eonauth\third_party\monocypher\*.c to your project, and
add eonauth\include, eonauth\src and eonauth\third_party\monocypher to the include directories.
The result is the same.
Third-party code
Section titled “Third-party code”Response signatures are checked with Monocypher 4.0.3 (in
third_party/monocypher, CC0 or 2-clause BSD; see its LICENCE.md), because Windows CNG has no
Ed25519. Nothing else is bundled.
Harden your process
Section titled “Harden your process”Call these first thing in main or WinMain. The demos do it in demo::HardenProcess():
// DLLs load only from System32 and your app's folder, so a planted winhttp.dll// in the working directory or next to a downloaded installer is ignored.SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_SYSTEM32 | LOAD_LIBRARY_SEARCH_APPLICATION_DIR);SetDllDirectoryW(L"");// Heap corruption ends the process instead of carrying on in a corrupted state.HeapSetInformation(nullptr, HeapEnableTerminationOnCorruption, nullptr, 0);Release builds of the SDK and demos also compile with Control Flow Guard and link as CET shadow-stack compatible. Consider the same settings for your app.
Check it builds
Section titled “Check it builds”Open the SDK’s own C++ SDK.sln and build it once. Every project builds for Debug and Release, x64
and Win32. Then try the demos with your own config.h.