class KShred

Erase a file in a way that makes recovery impossible -- well, no guarentee of that, but at least as difficult as reasonably possible. More...

Definition#include <kshred.h>
InheritsQObject (kdecore)
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Signals

Public Static Methods


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.

 KShred (QString fileName)

Initialize the class using the name of the file to 'shred'.

Parameters:
fileNamefully qualified name of the file to shred.

bool  fill1s ()

Writes all 1's over the entire file and flushes the file buffers.

Returns: true on success, false on error (invalid filename or write error)

bool  fill0s ()

Writes all 0's over the entire file and flushes the file buffers.

Returns: true on success, false on error (invalid filename or write error)

bool  fillbyte (uint byte)

Writes the specified byte over the entire file and flushes the file buffers.

Parameters:
bytethe value to write over every byte of the file

Returns: true on success, false on error (invalid filename or write error)

bool  fillrandom ()

Writes random bites over the entire file and flushes the file buffers.

Returns: true on success, false on error (invalid filename or write error)

bool  fillpattern (char *pattern, uint size)

Writes the specified byte array over the entire file and flushes the file buffers.

Parameters:
patternthe value to write over the entire file
sizethe length of the 'pattern' byte array

Returns: true on success, false on error (invalid filename or write error)

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

Returns: true on success, false on error (invalid filename or write error)

bool  shred (QString fileName)

[static]

The simplest method to shred a file. No need to create an instance of the class.

Parameters:
fileNamefully qualified name of the file to shred.

void  processedSize (unsigned long bytes)

[signal]

Shows progress of the shredding.

Parameters:
bytesthe number of bytes written to the file