<HTML> <HEAD> <TITLE>class KShred</TITLE> <META NAME="Generator" CONTENT="KDOC "> </HEAD> <BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff"> <TABLE WIDTH="100%" BORDER="0"> <TR> <TD> <TABLE BORDER="0"> <TR><TD valign="top" align="left" cellspacing="10"> <h1>class KShred</h1> </TD> <TD valign="top" align="right" colspan="1"> Erase a file in a way that makes recovery impossible -- well, no guarentee of that, but at least as difficult as reasonably possible. <small><A HREF="#longdesc">More...</A></small></TD></TR> </TABLE> <HR> <TABLE BORDER="0"> <TR><TH>Definition</TH><TD><code>#include <<A HREF="kshred_h.html">kshred.h</A>></code></TD></TR> <TR><TH>Inherits</TH><TD><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qobject.html">QObject</A> <small>(qt)</small> <small>[public ]</small></TD></TR> <TR><TH><A HREF="full-list-KShred.html">List of all Methods</A></TH></TR> </TABLE> </TD> <TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR> <TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR> <TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR> <TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR> <TR><TD><small><A HREF="index.html">Index</A></small></TD></TR> </TABLE></TD></TR></TABLE> <h4>Public Methods</h4><ul><LI> <b><A HREF="#ref1">KShred</A></b> (<A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> fileName) </LI> <LI> <b><A HREF="#ref2">~KShred</A></b> () </LI> <LI>bool <b><A HREF="#ref3">fill1s</A></b> () </LI> <LI>bool <b><A HREF="#ref4">fill0s</A></b> () </LI> <LI>bool <b><A HREF="#ref5">fillbyte</A></b> (unsigned int byte) </LI> <LI>bool <b><A HREF="#ref6">fillrandom</A></b> () </LI> <LI>bool <b><A HREF="#ref7">fillpattern</A></b> (unsigned char *pattern, unsigned int size) </LI> <LI>bool <b><A HREF="#ref8">shred</A></b> () </LI> </ul><h4>Signals</h4><ul><LI>void <b><A HREF="#ref10">processedSize</A></b> (unsigned long bytes) </LI> <LI>void <b><A HREF="#ref11">infoMessage</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &) </LI> </ul><h4>Public Static Methods</h4><ul><LI>static bool <b><A HREF="#ref9">shred</A></b> (<A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> fileName) </LI> </ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p> 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. </p> <A NAME="KShred"></A><A NAME="ref1"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>KShred</strong> (<A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> fileName) <br></td><td align="right"><h3><strong>KShred</strong></h3></td></tr></table><p></p><p> Initialize the class using the name of the file to 'shred'. </p> <p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5"> <TR><TD align="left" valign="top"><i>fileName</i></TD><TD align="left" valign="top">fully qualified name of the file to shred. </TD></TR> </TABLE></P> <A NAME="~KShred"></A><A NAME="ref2"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>~KShred</strong> () <br></td><td align="right"><h3><strong>~KShred</strong></h3></td></tr></table><p></p><A NAME="fill1s"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool <strong>fill1s</strong> () <br></td><td align="right"><h3><strong>fill1s</strong></h3></td></tr></table><p></p><p> Writes all 1's over the entire file and flushes the file buffers. </p> <p><b>Returns</b>: true on success, false on error (invalid filename or write error) </p> <A NAME="fill0s"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool <strong>fill0s</strong> () <br></td><td align="right"><h3><strong>fill0s</strong></h3></td></tr></table><p></p><p> Writes all 0's over the entire file and flushes the file buffers. </p> <p><b>Returns</b>: true on success, false on error (invalid filename or write error) </p> <A NAME="fillbyte"></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool <strong>fillbyte</strong> (unsigned int byte) <br></td><td align="right"><h3><strong>fillbyte</strong></h3></td></tr></table><p></p><p> Writes the specified byte over the entire file and flushes the file buffers. </p> <p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5"> <TR><TD align="left" valign="top"><i>byte</i></TD><TD align="left" valign="top">the value to write over every byte of the file </TD></TR> </TABLE></P> <p><b>Returns</b>: true on success, false on error (invalid filename or write error) </p> <A NAME="fillrandom"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool <strong>fillrandom</strong> () <br></td><td align="right"><h3><strong>fillrandom</strong></h3></td></tr></table><p></p><p> Writes random bites over the entire file and flushes the file buffers. </p> <p><b>Returns</b>: true on success, false on error (invalid filename or write error) </p> <A NAME="fillpattern"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool <strong>fillpattern</strong> (unsigned char *pattern, unsigned int size) <br></td><td align="right"><h3><strong>fillpattern</strong></h3></td></tr></table><p></p><p> Writes the specified byte array over the entire file and flushes the file buffers. </p> <p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5"> <TR><TD align="left" valign="top"><i>pattern</i></TD><TD align="left" valign="top">the value to write over the entire file </TD></TR> <TR><TD align="left" valign="top"><i>size</i></TD><TD align="left" valign="top">the length of the 'pattern' byte array </TD></TR> </TABLE></P> <p><b>Returns</b>: true on success, false on error (invalid filename or write error) </p> <A NAME="shred"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool <strong>shred</strong> () <br></td><td align="right"><h3><strong>shred</strong></h3></td></tr></table><p></p><p> Shreds a file by writing a series of values over it (uses <A HREF="KShred.html#fill0s">fill0s</A>, then <A HREF="KShred.html#fill1s">fill1s</A>, then <A HREF="KShred.html#fillrandom">fillrandom</A>, then <A HREF="KShred.html#fillbyte">fillbyte</A> with 0101..., then <A HREF="KShred.html#fillbyte">fillbyte</A> with 1010.... </p> <p><b>Returns</b>: true on success, false on error (invalid filename or write error) </p> <A NAME="shred"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool <strong>shred</strong> (<A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> fileName) <br></td><td align="right"><h3><strong>shred</strong></h3></td></tr></table><p> <small>[static]</small></p><p> The simplest method to shred a file. No need to create an instance of the class. </p> <p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5"> <TR><TD align="left" valign="top"><i>fileName</i></TD><TD align="left" valign="top">fully qualified name of the file to shred. </TD></TR> </TABLE></P> <A NAME="processedSize"></A><A NAME="ref10"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>processedSize</strong> (unsigned long bytes) <br></td><td align="right"><h3><strong>processedSize</strong></h3></td></tr></table><p> <small>[signal]</small></p><p> Shows progress of the shredding. </p> <p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5"> <TR><TD align="left" valign="top"><i>bytes</i></TD><TD align="left" valign="top">the number of bytes written to the file </TD></TR> </TABLE></P> <A NAME="infoMessage"></A><A NAME="ref11"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>infoMessage</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &) <br></td><td align="right"><h3><strong>infoMessage</strong></h3></td></tr></table><p> <small>[signal]</small></p><p> Shows a message in the progress dialog </p> <p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5"> <TR><TD align="left" valign="top"><i>the</i></TD><TD align="left" valign="top">message to display </TD></TR> </TABLE></P> <HR><UL><LI><i>Author</i>: David Faure <faure@kde.org> (integration into KDE and progress signal) </LI><LI><i>Generated</i>: qateam on updates.mandrakesoft.com on Mon Dec 30 16:09:14 2002, using kdoc 2.0a53.</LI></UL></BODY></HTML>