\doxysection{src/gsm/kdf/sha256\+\_\+i.h File Reference}
\label{sha256__i_8h}\index{src/gsm/kdf/sha256\_i.h@{src/gsm/kdf/sha256\_i.h}}
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ sha256\+\_\+state}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ SHA256\+\_\+\+BLOCK\+\_\+\+SIZE}~64
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ sha256\+\_\+init} (struct \textbf{ sha256\+\_\+state} $\ast$md)
\item 
int \textbf{ sha256\+\_\+process} (struct \textbf{ sha256\+\_\+state} $\ast$md, const unsigned char $\ast$in, unsigned long inlen)
\begin{DoxyCompactList}\small\item\em Process a block of memory though the hash. \end{DoxyCompactList}\item 
int \textbf{ sha256\+\_\+done} (struct \textbf{ sha256\+\_\+state} $\ast$md, unsigned char $\ast$out)
\begin{DoxyCompactList}\small\item\em Terminate the hash to get the digest. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Macro Definition Documentation}
\mbox{\label{sha256__i_8h_a9c1fe69ad43d4ca74b84303a0ed64f2f}} 
\index{sha256\_i.h@{sha256\_i.h}!SHA256\_BLOCK\_SIZE@{SHA256\_BLOCK\_SIZE}}
\index{SHA256\_BLOCK\_SIZE@{SHA256\_BLOCK\_SIZE}!sha256\_i.h@{sha256\_i.h}}
\doxysubsubsection{SHA256\_BLOCK\_SIZE}
{\footnotesize\ttfamily \#define SHA256\+\_\+\+BLOCK\+\_\+\+SIZE~64}



\doxysubsection{Function Documentation}
\mbox{\label{sha256__i_8h_a1939416ef1730d4692944ec46da5c396}} 
\index{sha256\_i.h@{sha256\_i.h}!sha256\_done@{sha256\_done}}
\index{sha256\_done@{sha256\_done}!sha256\_i.h@{sha256\_i.h}}
\doxysubsubsection{sha256\_done()}
{\footnotesize\ttfamily int sha256\+\_\+done (\begin{DoxyParamCaption}\item[{struct \textbf{ sha256\+\_\+state} $\ast$}]{md,  }\item[{unsigned char $\ast$}]{out }\end{DoxyParamCaption})}



Terminate the hash to get the digest. 


\begin{DoxyParams}{Parameters}
{\em md} & The hash state \\
\hline
{\em out} & [out] The destination of the hash (32 bytes) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
CRYPT\+\_\+\+OK if successful 
\end{DoxyReturn}


References \textbf{ sha256\+\_\+state\+::buf}, \textbf{ sha256\+\_\+state\+::curlen}, \textbf{ sha256\+\_\+state\+::length}, \textbf{ SHA256\+\_\+\+BLOCK\+\_\+\+SIZE}, \textbf{ sha256\+\_\+compress()}, \textbf{ sha256\+\_\+state\+::state}, \textbf{ WPA\+\_\+\+PUT\+\_\+\+BE32}, and \textbf{ WPA\+\_\+\+PUT\+\_\+\+BE64}.



Referenced by \textbf{ sha256\+\_\+vector()}.

\mbox{\label{sha256__i_8h_abbad427a9bd58421c2dd49112d8c0410}} 
\index{sha256\_i.h@{sha256\_i.h}!sha256\_init@{sha256\_init}}
\index{sha256\_init@{sha256\_init}!sha256\_i.h@{sha256\_i.h}}
\doxysubsubsection{sha256\_init()}
{\footnotesize\ttfamily void sha256\+\_\+init (\begin{DoxyParamCaption}\item[{struct \textbf{ sha256\+\_\+state} $\ast$}]{md }\end{DoxyParamCaption})}



References \textbf{ sha256\+\_\+state\+::curlen}, \textbf{ sha256\+\_\+state\+::length}, and \textbf{ sha256\+\_\+state\+::state}.



Referenced by \textbf{ sha256\+\_\+vector()}.

\mbox{\label{sha256__i_8h_ae7561631dd1f7860a4f0b300b9b465b7}} 
\index{sha256\_i.h@{sha256\_i.h}!sha256\_process@{sha256\_process}}
\index{sha256\_process@{sha256\_process}!sha256\_i.h@{sha256\_i.h}}
\doxysubsubsection{sha256\_process()}
{\footnotesize\ttfamily int sha256\+\_\+process (\begin{DoxyParamCaption}\item[{struct \textbf{ sha256\+\_\+state} $\ast$}]{md,  }\item[{const unsigned char $\ast$}]{in,  }\item[{unsigned long}]{inlen }\end{DoxyParamCaption})}



Process a block of memory though the hash. 


\begin{DoxyParams}{Parameters}
{\em md} & The hash state \\
\hline
{\em in} & The data to hash \\
\hline
{\em inlen} & The length of the data (octets) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
CRYPT\+\_\+\+OK if successful 
\end{DoxyReturn}


References \textbf{ sha256\+\_\+state\+::buf}, \textbf{ sha256\+\_\+state\+::curlen}, \textbf{ sha256\+\_\+state\+::length}, \textbf{ MIN}, \textbf{ n}, \textbf{ os\+\_\+memcpy}, \textbf{ SHA256\+\_\+\+BLOCK\+\_\+\+SIZE}, and \textbf{ sha256\+\_\+compress()}.



Referenced by \textbf{ sha256\+\_\+vector()}.

