\section{KShred Class Reference}
\label{classKShred}\index{KShred@{KShred}}
{\tt \#include $<$kshred.h$>$}

Inheritance diagram for KShred:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=44pt]{classKShred__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KShred:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=73pt]{classKShred__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf processed\-Size} ({\bf KIO::filesize\_\-t} bytes)
\item 
void {\bf info\-Message} (const {\bf QString} \&message)
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KShred} ({\bf QString} file\-Name)
\item 
bool {\bf fill1s} ()
\item 
bool {\bf fill0s} ()
\item 
bool {\bf fillbyte} (unsigned int byte)
\item 
bool {\bf fillrandom} ()
\item 
bool {\bf fillpattern} (unsigned char $\ast$pattern, unsigned int size)
\item 
bool {\bf shred} ()
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static bool {\bf shred} ({\bf QString} file\-Name)
\end{CompactItemize}


\subsection{Detailed Description}
\begin{Desc}
\item[{\bf Deprecated}]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.\end{Desc}
\begin{Desc}
\item[Author:]Andreas F. Pour $<${\tt bugs@mieterra.com}$>$ 

David Faure $<${\tt faure@kde.org}$>$ (integration into {\bf KDE} and progress signal) \end{Desc}




Definition at line 45 of file kshred.h.

\subsection{Constructor \& Destructor Documentation}
\index{KShred@{KShred}!KShred@{KShred}}
\index{KShred@{KShred}!KShred@{KShred}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KShred::KShred ({\bf QString} {\em file\-Name})}\label{classKShred_a0}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em file\-Name}]fully qualified name of the file to shred.\end{description}
\end{Desc}


Definition at line 31 of file kshred.cpp.

References endl(), QString::is\-Empty(), kd\-Error(), QString::local8Bit(), QFile::open(), QFile::set\-Name(), and QFile::size().

\subsection{Member Function Documentation}
\index{KShred@{KShred}!fill1s@{fill1s}}
\index{fill1s@{fill1s}!KShred@{KShred}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KShred::fill1s ()}\label{classKShred_a2}


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

\begin{Desc}
\item[Returns:]true on success, false on error (invalid filename or write error)\end{Desc}


Definition at line 68 of file kshred.cpp.

References fillbyte().\index{KShred@{KShred}!fill0s@{fill0s}}
\index{fill0s@{fill0s}!KShred@{KShred}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KShred::fill0s ()}\label{classKShred_a3}


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

\begin{Desc}
\item[Returns:]true on success, false on error (invalid filename or write error)\end{Desc}


Definition at line 75 of file kshred.cpp.

References fillbyte().\index{KShred@{KShred}!fillbyte@{fillbyte}}
\index{fillbyte@{fillbyte}!KShred@{KShred}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KShred::fillbyte (unsigned int {\em byte})}\label{classKShred_a4}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em byte}]the value to write over every byte of the file \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true on success, false on error (invalid filename or write error)\end{Desc}


Definition at line 82 of file kshred.cpp.

References flush().

Referenced by fill0s(), fill1s(), and shred().\index{KShred@{KShred}!fillrandom@{fillrandom}}
\index{fillrandom@{fillrandom}!KShred@{KShred}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KShred::fillrandom ()}\label{classKShred_a5}


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

\begin{Desc}
\item[Returns:]true on success, false on error (invalid filename or write error)\end{Desc}


Definition at line 122 of file kshred.cpp.

References flush().

Referenced by shred().\index{KShred@{KShred}!fillpattern@{fillpattern}}
\index{fillpattern@{fillpattern}!KShred@{KShred}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KShred::fillpattern (unsigned char $\ast$ {\em pattern}, unsigned int {\em size})}\label{classKShred_a6}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pattern}]the value to write over the entire file \item[{\em size}]the length of the 'pattern' byte array \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true on success, false on error (invalid filename or write error)\end{Desc}


Definition at line 103 of file kshred.cpp.

References flush().

Referenced by shred().\index{KShred@{KShred}!shred@{shred}}
\index{shred@{shred}!KShred@{KShred}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KShred::shred ()}\label{classKShred_a7}


Shreds a file by writing a series of values over it (uses {\bf fill0s}{\rm (p.\,\pageref{classKShred_a3})}, then fill1s, then fillrandom, then fillbyte with 0101..., then fillbyte with 1010.... 

\begin{Desc}
\item[Returns:]true on success, false on error (invalid filename or write error) \end{Desc}


Definition at line 207 of file kshred.cpp.

References QString::arg(), fillbyte(), fillpattern(), fillrandom(), info\-Message(), processed\-Size(), and QFile::remove().

Referenced by shred().\index{KShred@{KShred}!shred@{shred}}
\index{shred@{shred}!KShred@{KShred}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KShred::shred ({\bf QString} {\em file\-Name})\hspace{0.3cm}{\tt  [static]}}\label{classKShred_e0}


The simplest method to shred a file. 

No need to create an instance of the class. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em file\-Name}]fully qualified name of the file to shred. \end{description}
\end{Desc}


Definition at line 149 of file kshred.cpp.

References QString::is\-Empty(), and shred().\index{KShred@{KShred}!processedSize@{processedSize}}
\index{processedSize@{processedSize}!KShred@{KShred}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KShred::processed\-Size ({\bf KIO::filesize\_\-t} {\em bytes})\hspace{0.3cm}{\tt  [signal]}}\label{classKShred_l0}


Shows progress of the shredding. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em bytes}]the number of bytes written to the file \end{description}
\end{Desc}


Referenced by shred().\index{KShred@{KShred}!infoMessage@{infoMessage}}
\index{infoMessage@{infoMessage}!KShred@{KShred}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KShred::info\-Message (const {\bf QString} \& {\em message})\hspace{0.3cm}{\tt  [signal]}}\label{classKShred_l1}


Shows a message in the progress dialog. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em message}]the message to display \end{description}
\end{Desc}


Referenced by shred().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kshred.h\item 
kshred.cpp\end{CompactItemize}
