On Windows x64, `long` & `ulong` are 4 bytes instead of 8 bytes like
everywhere else
Co-authored-by: Jarred Sumner
#if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA
BCryptHashData(ctx->hHash,
(PUCHAR)(uintptr_t)buf,
- len, 0);
+ (ULONG)len, 0);
#else
CryptHashData(ctx->hash,
(unsigned char *)(uintptr_t)buf,
status = BCryptOpenAlgorithmProvider(&hAlg, BCRYPT_RNG_ALGORITHM, NULL, 0);
if (!BCRYPT_SUCCESS(status))
return ARCHIVE_FAILED;
- status = BCryptGenRandom(hAlg, buf, nbytes, 0);
+ status = BCryptGenRandom(hAlg, buf, (ULONG)nbytes, 0);
BCryptCloseAlgorithmProvider(hAlg, 0);
if (!BCRYPT_SUCCESS(status))
return ARCHIVE_FAILED;