xref: /optee_os/core/lib/libtomcrypt/src/misc/zeromem.c (revision 23ef3871cb5814f45010171373add4d339285616)
1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis */
2 /* SPDX-License-Identifier: Unlicense */
3 #include "tomcrypt_private.h"
4 #include <string_ext.h>
5 
6 /**
7    @file zeromem.c
8    Zero a block of memory, Tom St Denis
9 */
10 
11 /**
12    Zero a block of memory
13    @param out    The destination of the area to zero
14    @param outlen The length of the area to zero (octets)
15 */
16 void zeromem(volatile void *out, size_t outlen)
17 {
18    LTC_ARGCHKVD(out != NULL);
19    memzero_explicit((void *)out, outlen);
20 }
21