1 // SPDX-License-Identifier: BSD-2-Clause 2 /* LibTomCrypt, modular cryptographic library -- Tom St Denis 3 * 4 * LibTomCrypt is a library that provides various cryptographic 5 * algorithms in a highly modular and flexible manner. 6 * 7 * The library is free for all purposes without any express 8 * guarantee it works. 9 */ 10 #include "tomcrypt_private.h" 11 #include <string_ext.h> 12 13 /** 14 @file zeromem.c 15 Zero a block of memory, Tom St Denis 16 */ 17 18 /** 19 Zero a block of memory 20 @param out The destination of the area to zero 21 @param outlen The length of the area to zero (octets) 22 */ 23 void zeromem(volatile void *out, size_t outlen) 24 { 25 LTC_ARGCHKVD(out != NULL); 26 memzero_explicit((void *)out, outlen); 27 } 28 29 /* ref: $Format:%D$ */ 30 /* git commit: $Format:%H$ */ 31 /* commit time: $Format:%ai$ */ 32