go-sqlcipher/zeromem.c

25 lines
530 B
C
Raw Permalink Normal View History

/* LibTomCrypt, modular cryptographic library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#include "tomcrypt_private.h"
#include <string.h>
2015-04-28 23:56:53 +00:00
/**
@file zeromem.c
Zero a block of memory, Tom St Denis
*/
/**
Zero a block of memory
@param out The destination of the area to zero
@param outlen The length of the area to zero (octets)
*/
void zeromem(volatile void *out, size_t outlen)
2015-04-28 23:56:53 +00:00
{
LTC_ARGCHKVD(out != NULL);
memset((void *)out, 0, outlen);
2015-04-28 23:56:53 +00:00
}
/* $Source$ */
/* $Revision$ */
/* $Date$ */