1 /*
2 Copyright (C) 2015-2021, Dirk Krause
3 SPDX-License-Identifier: BSD-3-Clause
4 */
5 
6 /*
7 	WARNING: This file was generated by the dkct program (see
8 	http://dktools.sourceforge.net/ for details).
9 	Changes you make here will be lost if dkct is run again!
10 	You should modify the original source and run dkct on it.
11 	Original source: dk4memrs.ctr
12 */
13 
14 #ifndef DK4MEMRS_H_INCLUDED
15 /** Avoid multiple inclusions. */
16 #define DK4MEMRS_H_INCLUDED 1
17 
18 
19 /**	@file	dk4memrs.h	Secure memory reset.
20 
21 	Securely reset byte buffer to 0x00 bytes.
22 */
23 
24 
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 /**	Secure memory reset.
31 
32 	CRT on Windows: Not used.
33 	@param	ptr	Start address of memory range.
34 	@param	sz	Size of memory range in bytes.
35 	@param	erp	Error report, may be NULL.
36 	@return	1 on success, 0 on error. You should not ignore the
37 	return value.
38 
39 	Error codes:
40 	- DK4_E_INVALID_ARGUMENTS<br>
41 	  if ptr is NULL or sz is 0,
42 	- DK4_E_BUG<br>
43 	  if one of the bytes in the buffer is not 0 during check.
44 */
45 int
46 dk4mem_reset_secure(
47   void     *ptr,
48   size_t    sz,
49   dk4_er_t *erp
50 );
51 
52 
53 #ifdef __cplusplus
54 }
55 #endif
56 
57 
58 
59 
60 #endif
61