Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > e8773dc1178a3ee82e29ab36424dc729 > files > 1196

libbeecrypt-devel-4.2.1-6.mga1.i586.rpm

\hypertarget{sha256_8h}{
\section{include/beecrypt/sha256.h File Reference}
\label{sha256_8h}\index{include/beecrypt/sha256.h@{include/beecrypt/sha256.h}}
}


SHA-\/256 hash function, headers.  


{\ttfamily \#include \char`\"{}beecrypt/beecrypt.h\char`\"{}}\par
Include dependency graph for sha256.h:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=210pt]{sha256_8h__incl}
\end{center}
\end{figure}
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structsha256Param}{sha256Param}
\begin{DoxyCompactList}\small\item\em Holds all the parameters necessary for the SHA-\/256 algorithm. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{sha256_8h_a0e0db13a02e016e19a677057e472960f}{sha256Process} (\hyperlink{structsha256Param}{sha256Param} $\ast$sp)
\begin{DoxyCompactList}\small\item\em This function performs the core of the SHA-\/256 hash algorithm; it processes a block of 64 bytes. \item\end{DoxyCompactList}\item 
int \hyperlink{sha256_8h_af74134022427bead53c88a7396fe09bb}{sha256Reset} (\hyperlink{structsha256Param}{sha256Param} $\ast$sp)
\begin{DoxyCompactList}\small\item\em This function resets the parameter block so that it's ready for a new hash. \item\end{DoxyCompactList}\item 
int \hyperlink{sha256_8h_ad319a7f3170b74c82543b0f9445716d1}{sha256Update} (\hyperlink{structsha256Param}{sha256Param} $\ast$sp, const \hyperlink{api_8h_ab8ef12fab634c171394422d0ee8baf94}{byte} $\ast$data, size\_\-t size)
\begin{DoxyCompactList}\small\item\em This function should be used to pass successive blocks of data to be hashed. \item\end{DoxyCompactList}\item 
int \hyperlink{sha256_8h_ac0c9981d67a9dcda8e091bafa70cc944}{sha256Digest} (\hyperlink{structsha256Param}{sha256Param} $\ast$sp, \hyperlink{api_8h_ab8ef12fab634c171394422d0ee8baf94}{byte} $\ast$digest)
\begin{DoxyCompactList}\small\item\em This function finishes the current hash computation and copies the digest value into {\itshape digest\/}. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
const \hyperlink{structhashFunction}{hashFunction} \hyperlink{sha256_8h_a679979280ae9498651049fe553f9afae}{sha256}
\begin{DoxyCompactList}\small\item\em Holds the full API description of the SHA-\/256 algorithm. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
SHA-\/256 hash function, headers. \begin{DoxyAuthor}{Author}
Bob Deblier $<$\href{mailto:bob.deblier@telenet.be}{\tt bob.deblier@telenet.be}$>$ 
\end{DoxyAuthor}


\subsection{Function Documentation}
\hypertarget{sha256_8h_ac0c9981d67a9dcda8e091bafa70cc944}{
\index{sha256.h@{sha256.h}!sha256Digest@{sha256Digest}}
\index{sha256Digest@{sha256Digest}!sha256.h@{sha256.h}}
\subsubsection[{sha256Digest}]{\setlength{\rightskip}{0pt plus 5cm}int sha256Digest (
\begin{DoxyParamCaption}
\item[{{\bf sha256Param} $\ast$}]{sp, }
\item[{{\bf byte} $\ast$}]{digest}
\end{DoxyParamCaption}
)}}
\label{sha256_8h_ac0c9981d67a9dcda8e091bafa70cc944}


This function finishes the current hash computation and copies the digest value into {\itshape digest\/}. 


\begin{DoxyParams}{Parameters}
{\em sp} & The hash function's parameter block. \\
\hline
{\em digest} & The place to store the 32-\/byte digest. \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & on success. \\
\hline
\end{DoxyRetVals}
\hypertarget{sha256_8h_a0e0db13a02e016e19a677057e472960f}{
\index{sha256.h@{sha256.h}!sha256Process@{sha256Process}}
\index{sha256Process@{sha256Process}!sha256.h@{sha256.h}}
\subsubsection[{sha256Process}]{\setlength{\rightskip}{0pt plus 5cm}void sha256Process (
\begin{DoxyParamCaption}
\item[{{\bf sha256Param} $\ast$}]{sp}
\end{DoxyParamCaption}
)}}
\label{sha256_8h_a0e0db13a02e016e19a677057e472960f}


This function performs the core of the SHA-\/256 hash algorithm; it processes a block of 64 bytes. 


\begin{DoxyParams}{Parameters}
{\em sp} & The hash function's parameter block. \\
\hline
\end{DoxyParams}
\hypertarget{sha256_8h_af74134022427bead53c88a7396fe09bb}{
\index{sha256.h@{sha256.h}!sha256Reset@{sha256Reset}}
\index{sha256Reset@{sha256Reset}!sha256.h@{sha256.h}}
\subsubsection[{sha256Reset}]{\setlength{\rightskip}{0pt plus 5cm}int sha256Reset (
\begin{DoxyParamCaption}
\item[{{\bf sha256Param} $\ast$}]{sp}
\end{DoxyParamCaption}
)}}
\label{sha256_8h_af74134022427bead53c88a7396fe09bb}


This function resets the parameter block so that it's ready for a new hash. 


\begin{DoxyParams}{Parameters}
{\em sp} & The hash function's parameter block. \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & on success. \\
\hline
\end{DoxyRetVals}
\hypertarget{sha256_8h_ad319a7f3170b74c82543b0f9445716d1}{
\index{sha256.h@{sha256.h}!sha256Update@{sha256Update}}
\index{sha256Update@{sha256Update}!sha256.h@{sha256.h}}
\subsubsection[{sha256Update}]{\setlength{\rightskip}{0pt plus 5cm}int sha256Update (
\begin{DoxyParamCaption}
\item[{{\bf sha256Param} $\ast$}]{sp, }
\item[{const {\bf byte} $\ast$}]{data, }
\item[{size\_\-t}]{size}
\end{DoxyParamCaption}
)}}
\label{sha256_8h_ad319a7f3170b74c82543b0f9445716d1}


This function should be used to pass successive blocks of data to be hashed. 


\begin{DoxyParams}{Parameters}
{\em sp} & The hash function's parameter block. \\
\hline
{\em data} & \\
\hline
{\em size} & \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & on success. \\
\hline
\end{DoxyRetVals}


\subsection{Variable Documentation}
\hypertarget{sha256_8h_a679979280ae9498651049fe553f9afae}{
\index{sha256.h@{sha256.h}!sha256@{sha256}}
\index{sha256@{sha256}!sha256.h@{sha256.h}}
\subsubsection[{sha256}]{\setlength{\rightskip}{0pt plus 5cm}{\bf sha256}}}
\label{sha256_8h_a679979280ae9498651049fe553f9afae}


Holds the full API description of the SHA-\/256 algorithm.