aboutsummaryrefslogtreecommitdiff
path: root/contrib/pam_modules/pam_passwdqc/passwdqc_memzero.c
blob: 3a2505e762174f5e8c89efcc7fb6e221866cb170 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Copyright (c) 2016 by Solar Designer.  See LICENSE.
 */

#ifdef _MSC_VER
#include <windows.h>
#else
#include <string.h>
#endif

static void memzero(void *buf, size_t len)
{
#ifdef _MSC_VER
	SecureZeroMemory(buf, len);
#else
	memset(buf, 0, len);
#endif
}

void (*_passwdqc_memzero)(void *, size_t) = memzero;