Implement wxSecureZeroMemory() for clearing memory securely

Wrap native function when possible, and fallback to a generic
implementation.

Closes https://github.com/wxWidgets/wxWidgets/pull/2582
This commit is contained in:
Lauri Nurmi
2021-11-05 18:28:07 +02:00
committed by Vadim Zeitlin
parent 4f7e09374a
commit 90c20798b9
4 changed files with 70 additions and 0 deletions

View File

@@ -324,6 +324,12 @@ WXDLLIMPEXP_BASE void wxDecToHex(unsigned char dec, wxChar *buf);
WXDLLIMPEXP_BASE void wxDecToHex(unsigned char dec, char* ch1, char* ch2);
WXDLLIMPEXP_BASE wxString wxDecToHex(unsigned char dec);
// ----------------------------------------------------------------------------
// Security
// ----------------------------------------------------------------------------
WXDLLIMPEXP_BASE void wxSecureZeroMemory(void *p, size_t n);
// ----------------------------------------------------------------------------
// Process management
// ----------------------------------------------------------------------------