\hypertarget{sha512_8h}{ \section{include/beecrypt/sha512.h File Reference} \label{sha512_8h}\index{include/beecrypt/sha512.h@{include/beecrypt/sha512.h}} } SHA-\/512 hash function, headers. {\ttfamily \#include \char`\"{}beecrypt/beecrypt.h\char`\"{}}\par Include dependency graph for sha512.h: \nopagebreak \begin{figure}[H] \begin{center} \leavevmode \includegraphics[width=210pt]{sha512_8h__incl} \end{center} \end{figure} \subsection*{Data Structures} \begin{DoxyCompactItemize} \item struct \hyperlink{structsha512Param}{sha512Param} \begin{DoxyCompactList}\small\item\em Holds all the parameters necessary for the SHA-\/512 algorithm. \item\end{DoxyCompactList}\end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item void \hyperlink{sha512_8h_aca5b2b8be501af37ee832d345105ceed}{sha512Process} (\hyperlink{structsha512Param}{sha512Param} $\ast$sp) \begin{DoxyCompactList}\small\item\em This function performs the core of the SHA-\/512 hash algorithm; it processes a block of 128 bytes. \item\end{DoxyCompactList}\item int \hyperlink{sha512_8h_ab406c18a11951e105806fae3dbe92a02}{sha512Reset} (\hyperlink{structsha512Param}{sha512Param} $\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{sha512_8h_af83c86a5e329e18ce8f428dd27153ed8}{sha512Update} (\hyperlink{structsha512Param}{sha512Param} $\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{sha512_8h_a17e9377f30f0e0bd26035db993d08c4a}{sha512Digest} (\hyperlink{structsha512Param}{sha512Param} $\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{sha512_8h_a9102516dd8600391321073593bcfd425}{sha512} \begin{DoxyCompactList}\small\item\em Holds the full API description of the SHA-\/512 algorithm. \item\end{DoxyCompactList}\end{DoxyCompactItemize} \subsection{Detailed Description} SHA-\/512 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{sha512_8h_a17e9377f30f0e0bd26035db993d08c4a}{ \index{sha512.h@{sha512.h}!sha512Digest@{sha512Digest}} \index{sha512Digest@{sha512Digest}!sha512.h@{sha512.h}} \subsubsection[{sha512Digest}]{\setlength{\rightskip}{0pt plus 5cm}int sha512Digest ( \begin{DoxyParamCaption} \item[{{\bf sha512Param} $\ast$}]{sp, } \item[{{\bf byte} $\ast$}]{digest} \end{DoxyParamCaption} )}} \label{sha512_8h_a17e9377f30f0e0bd26035db993d08c4a} 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 64-\/byte digest. \\ \hline \end{DoxyParams} \begin{DoxyRetVals}{Return values} {\em 0} & on success. \\ \hline \end{DoxyRetVals} \hypertarget{sha512_8h_aca5b2b8be501af37ee832d345105ceed}{ \index{sha512.h@{sha512.h}!sha512Process@{sha512Process}} \index{sha512Process@{sha512Process}!sha512.h@{sha512.h}} \subsubsection[{sha512Process}]{\setlength{\rightskip}{0pt plus 5cm}void sha512Process ( \begin{DoxyParamCaption} \item[{{\bf sha512Param} $\ast$}]{sp} \end{DoxyParamCaption} )}} \label{sha512_8h_aca5b2b8be501af37ee832d345105ceed} This function performs the core of the SHA-\/512 hash algorithm; it processes a block of 128 bytes. \begin{DoxyParams}{Parameters} {\em sp} & The hash function's parameter block. \\ \hline \end{DoxyParams} \hypertarget{sha512_8h_ab406c18a11951e105806fae3dbe92a02}{ \index{sha512.h@{sha512.h}!sha512Reset@{sha512Reset}} \index{sha512Reset@{sha512Reset}!sha512.h@{sha512.h}} \subsubsection[{sha512Reset}]{\setlength{\rightskip}{0pt plus 5cm}int sha512Reset ( \begin{DoxyParamCaption} \item[{{\bf sha512Param} $\ast$}]{sp} \end{DoxyParamCaption} )}} \label{sha512_8h_ab406c18a11951e105806fae3dbe92a02} 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{sha512_8h_af83c86a5e329e18ce8f428dd27153ed8}{ \index{sha512.h@{sha512.h}!sha512Update@{sha512Update}} \index{sha512Update@{sha512Update}!sha512.h@{sha512.h}} \subsubsection[{sha512Update}]{\setlength{\rightskip}{0pt plus 5cm}int sha512Update ( \begin{DoxyParamCaption} \item[{{\bf sha512Param} $\ast$}]{sp, } \item[{const {\bf byte} $\ast$}]{data, } \item[{size\_\-t}]{size} \end{DoxyParamCaption} )}} \label{sha512_8h_af83c86a5e329e18ce8f428dd27153ed8} 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{sha512_8h_a9102516dd8600391321073593bcfd425}{ \index{sha512.h@{sha512.h}!sha512@{sha512}} \index{sha512@{sha512}!sha512.h@{sha512.h}} \subsubsection[{sha512}]{\setlength{\rightskip}{0pt plus 5cm}{\bf sha512}}} \label{sha512_8h_a9102516dd8600391321073593bcfd425} Holds the full API description of the SHA-\/512 algorithm.