Data wiping functions.
More...
◆ Opts
Wipe options.
Enumerator |
---|
Dod7Pass | DOD 7-pass (default)
|
Simple | Overwrite with single pass of zero bytes (quicker but less secure).
|
◆ Data()
static bool dipki::Wipe::Data |
( |
bvec_t & |
data | ) |
|
|
static |
Zeroise then clear data in memory.
- Parameters
-
- Returns
true
if successful; false
if fails
static std::string ToHex(const bvec_t &bv)
Encodes an array of bytes as a hexadecimal-encoded string.
static bool Data(bvec_t &data)
Zeroise then clear data in memory.
std::vector< unsigned char > bvec_t
A vector of bytes (our typedef for a byte array)
Definition: dipki.hpp:79
bvec_t str2bvec(const std::string &s)
Convert a string to a byte vector.
◆ File()
Securely wipe and delete a file.
- Parameters
-
fileName | Name of file to be wiped |
opts | Options (optional, default = DOD 7-pass) |
- Returns
true
if successful; false
if fails
◆ String()
static bool dipki::Wipe::String |
( |
std::string & |
s | ) |
|
|
static |
Zeroise then clear a string.
- Parameters
-
- Returns
true
if successful; false
if fails std::string s = "More secret data";
cout << "After Wipe::String='" << s << "'" << endl;
static bool String(std::string &s)
Zeroise then clear a string.