KShred Class Reference
Erase a file in a way that makes recovery impossible -- well, no guarentee of that, but at least as difficult as reasonably possible. More...
#include <kshred.h>
Inheritance diagram for KShred:

Signals | |
void | processedSize (KIO::filesize_t bytes) |
Shows progress of the shredding. | |
void | infoMessage (const QString &) |
Shows a message in the progress dialog. | |
Public Methods | |
KShred (QString fileName) | |
Initialize the class using the name of the file to 'shred'. | |
bool | fill1s () |
Writes all 1's over the entire file and flushes the file buffers. | |
bool | fill0s () |
Writes all 0's over the entire file and flushes the file buffers. | |
bool | fillbyte (unsigned int byte) |
Writes the specified byte over the entire file and flushes the file buffers. | |
bool | fillrandom () |
Writes random bites over the entire file and flushes the file buffers. | |
bool | fillpattern (unsigned char *pattern, unsigned int size) |
Writes the specified byte array over the entire file and flushes the file buffers. | |
bool | shred () |
Shreds a file by writing a series of values over it (uses fill0s, then fill1s, then fillrandom, then fillbyte with 0101..., then fillbyte with 1010.... | |
Static Public Methods | |
bool | shred (QString fileName) |
The simplest method to shred a file. |
Detailed Description
Erase a file in a way that makes recovery impossible -- well, no guarentee of that, but at least as difficult as reasonably possible.For this, KShred write several times over the existing file, using different patterns, before deleting it.
- Author:
- Andreas F. Pour <bugs@mieterra.com> , David Faure <faure@kde.org> (integration into KDE and progress signal)
Definition at line 45 of file kshred.h.
Constructor & Destructor Documentation
|
Initialize the class using the name of the file to 'shred'.
Definition at line 30 of file kshred.cpp. References QString::isEmpty(), QString::local8Bit(), QFile::open(), QFile::setName(), and QFile::size(). |
Member Function Documentation
|
Writes all 1's over the entire file and flushes the file buffers.
Definition at line 67 of file kshred.cpp. References fillbyte(). |
|
Writes all 0's over the entire file and flushes the file buffers.
Definition at line 74 of file kshred.cpp. References fillbyte(). |
|
Writes the specified byte over the entire file and flushes the file buffers.
Definition at line 81 of file kshred.cpp. |
|
Writes random bites over the entire file and flushes the file buffers.
Definition at line 121 of file kshred.cpp. Referenced by shred(). |
|
Writes the specified byte array over the entire file and flushes the file buffers.
Definition at line 102 of file kshred.cpp. Referenced by shred(). |
|
Shreds a file by writing a series of values over it (uses fill0s, then fill1s, then fillrandom, then fillbyte with 0101..., then fillbyte with 1010....
Definition at line 205 of file kshred.cpp. References QString::arg(), fillbyte(), fillpattern(), fillrandom(), infoMessage(), processedSize(), and QFile::remove(). Referenced by shred(). |
|
The simplest method to shred a file. No need to create an instance of the class.
Definition at line 147 of file kshred.cpp. References QString::isEmpty(), and shred(). |
|
Shows progress of the shredding.
Referenced by shred(). |
|
Shows a message in the progress dialog.
Referenced by shred(). |
The documentation for this class was generated from the following files: