mirror of
https://github.com/status-im/go-sqlcipher.git
synced 2026-08-27 16:21:09 +00:00
Also upgrade libtomcrypt to the latest version. Thanks to André Medeiros for preparing the switch to SQLCipher 4.x with https://github.com/mutecomm/go-sqlcipher/pull/9
24 lines
457 B
C
24 lines
457 B
C
/* LibTomCrypt, modular cryptographic library -- Tom St Denis */
|
|
/* SPDX-License-Identifier: Unlicense */
|
|
#include "tomcrypt_private.h"
|
|
|
|
/**
|
|
@file burn_stack.c
|
|
Burn stack, Tom St Denis
|
|
*/
|
|
|
|
/**
|
|
Burn some stack memory
|
|
@param len amount of stack to burn in bytes
|
|
*/
|
|
void burn_stack(unsigned long len)
|
|
{
|
|
unsigned char buf[32];
|
|
zeromem(buf, sizeof(buf));
|
|
if (len > (unsigned long)sizeof(buf)) {
|
|
burn_stack(len - sizeof(buf));
|
|
}
|
|
}
|
|
|
|
|