repo.or.cz
/
dragonfly.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
sys/vfs/hammer2: Fix multiple "radii" -> "radix"
[dragonfly.git]
/
contrib
/
pam_passwdqc
/
passwdqc_memzero.c
blob
3a2505e762174f5e8c89efcc7fb6e221866cb170
1
/*
2
* Copyright (c) 2016 by Solar Designer. See LICENSE.
3
*/
4
5
#ifdef _MSC_VER
6
#include <windows.h>
7
#else
8
#include <string.h>
9
#endif
10
11
static void
memzero
(
void
*
buf
,
size_t
len
)
12
{
13
#ifdef _MSC_VER
14
SecureZeroMemory
(
buf
,
len
);
15
#else
16
memset
(
buf
,
0
,
len
);
17
#endif
18
}
19
20
void
(*
_passwdqc_memzero
)(
void
*,
size_t
) =
memzero
;