summaryrefslogtreecommitdiffstats
path: root/openbsd-compat/explicit_bzero_win32.c
blob: 8017aff9999182c58743aa795bb41fe61111db76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * Public domain.
 * Win32 explicit_bzero compatibility shim.
 */

#include "openbsd-compat.h"

#if !defined(HAVE_EXPLICIT_BZERO) && defined(_WIN32)

#include <windows.h>
#include <string.h>

void
explicit_bzero(void *buf, size_t len)
{
	SecureZeroMemory(buf, len);
}

#endif /* !defined(HAVE_EXPLICIT_BZERO) && defined(_WIN32) */