For Developers · Libraries
SDK V5 (C++/C#)
Embed Panda Auth natively in your C++, C#, or .NET desktop application using the PUSL-V4 HTTP DLL. v2.0.1 — 2026-07-16.
Download & DLLs
PUSL-V4 uses HTTP (WinHTTP/SChannel) — no more OpenSSL or WebSocket dependencies. Only two DLLs needed. Drop them next to your executable:
PandaLib_PUSL.dlllibsodium.dll
Version:
Download PandaSDK_V5.zipv2.0.1Updated: 2026-07-16SHA-256: 523694a4c7edee9e…The exported functions
The DLL exports a small C API:
panda_v5.h
// panda_v5.h
#pragma once
#ifdef PANDA_V5_EXPORTS
#define PANDA_API extern "C" __declspec(dllexport)
#else
#define PANDA_API extern "C" __declspec(dllimport)
#endif
// Connect to server, validate key, start heartbeat.
PANDA_API bool Validate(const char* service, const char* key);
// Returns the GetKey URL with auto-HWID appended.
PANDA_API const char* Get_Key(const char* service);
// Check if the session is still alive (heartbeat ok, not expired).
// Fails if the internal thread detects debugging or heartbeat drops.
PANDA_API bool IsValid();
// Graceful disconnect.
PANDA_API void Shutdown();
// Get the last error message string.
PANDA_API const char* PandaGetLastError();Validate(service, key)— connect, validate, start heartbeat.Get_Key(service)— GetKey URL with HWID appended.IsValid()— is the session still alive (also fails on detected debugging).Shutdown()— graceful disconnect.PandaGetLastError()— last error message.
C# usage (P/Invoke)
Wrap the exports with P/Invoke and call them like any method:
using System;
using System.Runtime.InteropServices;
public class PandaSDK
{
private const string DllName = "PandaLib_PUSL.dll";
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern bool Validate(string service, string key);
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr Get_Key(string service);
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
public static extern bool IsValid();
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Shutdown();
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr PandaGetLastError();
// Safety wraps for string pointers
public static string GetKeyUrl(string service) {
return Marshal.PtrToStringAnsi(Get_Key(service));
}
public static string GetLastError() {
return Marshal.PtrToStringAnsi(PandaGetLastError());
}
}
// Example C# Implementation:
class Program {
static void Main() {
string serviceId = "your_service_id";
// 1. Give the user their GetKey URL
Console.WriteLine("Get Key URL: " + PandaSDK.GetKeyUrl(serviceId));
// 2. Prompt for key and Validate!
Console.Write("Enter Key: ");
string attempt = Console.ReadLine();
if (PandaSDK.Validate(serviceId, attempt)) {
Console.WriteLine("Authenticated!");
// 3. Periodically ensure validation holds over time
if (!PandaSDK.IsValid()) {
Console.WriteLine("Session expired, heartbeat failed, or debugger detected.");
Environment.Exit(0);
}
} else {
Console.WriteLine("Failed: " + PandaSDK.GetLastError());
}
}
}Heartbeat keeps it honest
After a successful
Validate, call IsValid() periodically. It returns false if the session expires, the heartbeat drops, or a debugger is detected.