CryptoSys API  6.22.1
Public Types | Static Public Member Functions | List of all members
crsysapi::Wipe Class Reference

Data wiping functions. More...

Public Types

enum  Opts : unsigned int
 Wipe options. More...
 

Static Public Member Functions

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...
 

Detailed Description

Data wiping functions.

Member Enumeration Documentation

◆ Opts

enum crsysapi::Wipe::Opts : unsigned int

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).

Member Function Documentation

◆ Data()

static bool crsysapi::Wipe::Data ( bvec_t data)
static

Zeroises data in memory.

Parameters
datadata to be wiped
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
fileNameName of file to be wiped
optsOptions (default = DOD 7-pass)
Returns
true if successful; false if fails
Exceptions
std::runtime_errorif file does not exist or cannot be opened.

◆ String()

static bool crsysapi::Wipe::String ( std::string &  s)
static

Zeroises a string.

Parameters
sString to be wiped
Returns
true if successful; false if fails
Copyright © 2001-24 D.I. Management Services Pty Limited ABN 78 083 210 584 Australia. All rights reserved. <www.di-mgt.com.au> <www.cryptosys.net>. Generated on Sat Jan 6 2024 18:00:07 by Doxygen 1.9.1.