Я хочу проверить функции EncryptMessage и DecryptMessage, чтобы шифровать и расшифровать простую строку, используя учетные данные моей машины (текущие процессы). Но я получаю ошибку сегментации.
Я очень признателен за любую помощь/подсказку. Спасибо < /p>
Исключение, брошенное по адресу 0x00007ffeda9172b4 (sspicli.dll) в win32playground.exe: 0xc00000000: Расположение на нарушение доступа 0x0000000000000000. />https://learn.microsoft.com/en-us/windo ... de]#define SECURITY_WIN32
#define WIN32_LEAN_AND_MEAN
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#pragma comment(lib, "Secur32.lib")
static int amir() {
CredHandle hCred;
CtxtHandle hCtx;
TimeStamp tsExpiry;
SECURITY_STATUS status = AcquireCredentialsHandleW(
NULL,
(SEC_WCHAR*)L"Negotiate", // Use Negotiate instead of NTLM for local auth
SECPKG_CRED_OUTBOUND,
NULL,
NULL, // NULL means use current user's credentials
NULL,
NULL,
&hCred,
&tsExpiry);
if (status != SEC_E_OK) {
std::wcerr
Подробнее здесь: https://stackoverflow.com/questions/797 ... tion-fault