File: explicit_bzero_win32.c

package info (click to toggle)
libfido2 1.16.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,620 kB
  • sloc: ansic: 34,755; sh: 519; makefile: 77; awk: 64
file content (19 lines) | stat: -rw-r--r-- 334 bytes parent folder | download | duplicates (7)
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) */