Data wiping functions.
More...
|
static bool | Data (bvec_t &data) |
| Zeroises data in memory. More...
|
|
static bool | File (const std::string &fileName, Opts opts=Opts::Default) |
| Securely wipe and delete a file with options. More...
|
|
static bool | String (std::string &s) |
| Zeroises a string. More...
|
|
◆ Opts
Wipe options.
Enumerator |
---|
Default | Default options (DOD 7-pass)
|
Dod7Pass | DOD 7-pass (default)
|
Simple | Overwrite with single pass of zero bytes (quicker but less secure).
|
◆ Data()
static bool crsysapi::Wipe::Data |
( |
bvec_t & |
data | ) |
|
|
static |
Zeroises data in memory.
- Parameters
-
- Returns
true
if successful; false
if fails
◆ File()
static bool crsysapi::Wipe::File |
( |
const std::string & |
fileName, |
|
|
Opts |
opts = Opts::Default |
|
) |
| |
|
static |
Securely wipe and delete a file with options.
- Parameters
-
fileName | Name of file to be wiped |
opts | Options (default = DOD 7-pass) |
- Returns
true
if successful; false
if fails
- Exceptions
-
std::runtime_error | if file does not exist or cannot be opened. |
◆ String()
static bool crsysapi::Wipe::String |
( |
std::string & |
s | ) |
|
|
static |
Zeroises a string.
- Parameters
-
- Returns
true
if successful; false
if fails