Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wine-mirror
GitHub Repository: wine-mirror/wine
Path: blob/master/libs/tomcrypt/src/misc/zeromem.c
5971 views
1
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
2
*
3
* LibTomCrypt is a library that provides various cryptographic
4
* algorithms in a highly modular and flexible manner.
5
*
6
* The library is free for all purposes without any express
7
* guarantee it works.
8
*/
9
#include "tomcrypt.h"
10
11
/**
12
@file zeromem.c
13
Zero a block of memory, Tom St Denis
14
*/
15
16
/**
17
Zero a block of memory
18
@param out The destination of the area to zero
19
@param outlen The length of the area to zero (octets)
20
*/
21
void zeromem(volatile void *out, size_t outlen)
22
{
23
volatile char *mem = out;
24
LTC_ARGCHKVD(out != NULL);
25
while (outlen-- > 0) {
26
*mem++ = '\0';
27
}
28
}
29
30