/*
Copyright (C) 2015-2020, Dirk Krause
SPDX-License-Identifier: BSD-3-Clause
*/
/*
WARNING: This file was generated by the dkct program (see
http://dktools.sourceforge.net/ for details).
Changes you make here will be lost if dkct is run again!
You should modify the original source and run dkct on it.
Original source: dk4memrs.ctr
*/
#ifndef DK4MEMRS_H_INCLUDED
/** Avoid multiple inclusions. */
#define DK4MEMRS_H_INCLUDED 1
#line 9 "dk4memrs.ctr"
/** @file dk4memrs.h Secure memory reset.
Securely reset byte buffer to 0x00 bytes.
*/
#ifdef __cplusplus
extern "C" {
#endif
/** Secure memory reset.
CRT on Windows: Not used.
@param ptr Start address of memory range.
@param sz Size of memory range in bytes.
@param erp Error report, may be NULL.
@return 1 on success, 0 on error. You should not ignore the
return value.
Error codes:
- DK4_E_INVALID_ARGUMENTS
if ptr is NULL or sz is 0,
- DK4_E_BUG
if one of the bytes in the buffer is not 0 during check.
*/
int
dk4mem_reset_secure(void *ptr, size_t sz, dk4_er_t *erp);
#ifdef __cplusplus
}
#endif
#endif