\section{aversive\_\-10-03-12/modules/crypto/md5/md5c.c File Reference}
\label{md5c_8c}\index{aversive\_\-10-03-12/modules/crypto/md5/md5c.c@{aversive\_\-10-03-12/modules/crypto/md5/md5c.c}}
{\tt \#include $<$string.h$>$}\par
{\tt \#include \char`\"{}md5.h\char`\"{}}\par
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf S11}~7
\item 
\#define {\bf S12}~12
\item 
\#define {\bf S13}~17
\item 
\#define {\bf S14}~22
\item 
\#define {\bf S21}~5
\item 
\#define {\bf S22}~9
\item 
\#define {\bf S23}~14
\item 
\#define {\bf S24}~20
\item 
\#define {\bf S31}~4
\item 
\#define {\bf S32}~11
\item 
\#define {\bf S33}~16
\item 
\#define {\bf S34}~23
\item 
\#define {\bf S41}~6
\item 
\#define {\bf S42}~10
\item 
\#define {\bf S43}~15
\item 
\#define {\bf S44}~21
\item 
\#define {\bf Encode}~memcpy
\item 
\#define {\bf Decode}~memcpy
\item 
\#define {\bf F}(x, y, z)~(((x) \& (y)) $|$ (($\sim$x) \& (z)))
\item 
\#define {\bf G}(x, y, z)~(((x) \& (z)) $|$ ((y) \& ($\sim$z)))
\item 
\#define {\bf H}(x, y, z)~((x) $^\wedge$ (y) $^\wedge$ (z))
\item 
\#define {\bf I}(x, y, z)~((y) $^\wedge$ ((x) $|$ ($\sim$z)))
\item 
\#define {\bf ROTATE\_\-LEFT}(x, n)~(((x) $<$$<$ (n)) $|$ ((x) $>$$>$ (32-(n))))
\item 
\#define {\bf FF}({\bf a}, b, c, d, x, {\bf s}, ac)
\item 
\#define {\bf GG}({\bf a}, b, c, d, x, {\bf s}, ac)
\item 
\#define {\bf HH}({\bf a}, b, c, d, x, {\bf s}, ac)
\item 
\#define {\bf II}({\bf a}, b, c, d, x, {\bf s}, ac)
\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
typedef unsigned char $\ast$ {\bf POINTER}
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void {\bf MD5Init} ({\bf MD5\_\-CTX} $\ast$context)
\item 
void {\bf MD5Update} ({\bf MD5\_\-CTX} $\ast$context, const unsigned char $\ast$input, unsigned int inputLen)
\item 
void {\bf MD5Final} (digest, {\bf MD5\_\-CTX} $\ast$context)
\end{CompactItemize}


\subsection{Define Documentation}
\index{md5c.c@{md5c.c}!Decode@{Decode}}
\index{Decode@{Decode}!md5c.c@{md5c.c}}
\subsubsection[Decode]{\setlength{\rightskip}{0pt plus 5cm}\#define Decode~memcpy}\label{md5c_8c_255f9a384e3cac6b49faeb7c2e8df584}




Definition at line 75 of file md5c.c.\index{md5c.c@{md5c.c}!Encode@{Encode}}
\index{Encode@{Encode}!md5c.c@{md5c.c}}
\subsubsection[Encode]{\setlength{\rightskip}{0pt plus 5cm}\#define Encode~memcpy}\label{md5c_8c_0d62978e58780635f8d595ad9a05f467}




Definition at line 74 of file md5c.c.

Referenced by MD5Final().\index{md5c.c@{md5c.c}!F@{F}}
\index{F@{F}!md5c.c@{md5c.c}}
\subsubsection[F]{\setlength{\rightskip}{0pt plus 5cm}\#define F(x, \/  y, \/  z)~(((x) \& (y)) $|$ (($\sim$x) \& (z)))}\label{md5c_8c_96d73bbd7af15cb1fc38c3f4a3bd82e9}




Definition at line 89 of file md5c.c.\index{md5c.c@{md5c.c}!FF@{FF}}
\index{FF@{FF}!md5c.c@{md5c.c}}
\subsubsection[FF]{\setlength{\rightskip}{0pt plus 5cm}\#define FF({\bf a}, \/  b, \/  c, \/  d, \/  x, \/  {\bf s}, \/  ac)}\label{md5c_8c_0a143972cb6c4fe16f0ffa8a3d41ebf3}


\textbf{Value:}

\begin{Code}\begin{verbatim}{ \
 (a) += F ((b), (c), (d)) + (x) + (uint32_t)(ac); \
 (a) = ROTATE_LEFT ((a), (s)); \
 (a) += (b); \
  }
\end{verbatim}
\end{Code}


Definition at line 101 of file md5c.c.\index{md5c.c@{md5c.c}!G@{G}}
\index{G@{G}!md5c.c@{md5c.c}}
\subsubsection[G]{\setlength{\rightskip}{0pt plus 5cm}\#define G(x, \/  y, \/  z)~(((x) \& (z)) $|$ ((y) \& ($\sim$z)))}\label{md5c_8c_d96b7cf3182ce2ba85e5a7a93b12c441}




Definition at line 90 of file md5c.c.\index{md5c.c@{md5c.c}!GG@{GG}}
\index{GG@{GG}!md5c.c@{md5c.c}}
\subsubsection[GG]{\setlength{\rightskip}{0pt plus 5cm}\#define GG({\bf a}, \/  b, \/  c, \/  d, \/  x, \/  {\bf s}, \/  ac)}\label{md5c_8c_685f32faa2a66e743850b990a13b8bfa}


\textbf{Value:}

\begin{Code}\begin{verbatim}{ \
 (a) += G ((b), (c), (d)) + (x) + (uint32_t)(ac); \
 (a) = ROTATE_LEFT ((a), (s)); \
 (a) += (b); \
  }
\end{verbatim}
\end{Code}


Definition at line 106 of file md5c.c.\index{md5c.c@{md5c.c}!H@{H}}
\index{H@{H}!md5c.c@{md5c.c}}
\subsubsection[H]{\setlength{\rightskip}{0pt plus 5cm}\#define H(x, \/  y, \/  z)~((x) $^\wedge$ (y) $^\wedge$ (z))}\label{md5c_8c_e42219072d798876e6b08e6b78614ff6}




Definition at line 91 of file md5c.c.\index{md5c.c@{md5c.c}!HH@{HH}}
\index{HH@{HH}!md5c.c@{md5c.c}}
\subsubsection[HH]{\setlength{\rightskip}{0pt plus 5cm}\#define HH({\bf a}, \/  b, \/  c, \/  d, \/  x, \/  {\bf s}, \/  ac)}\label{md5c_8c_8b9f1c4778df01ef970b87dbe5541dc5}


\textbf{Value:}

\begin{Code}\begin{verbatim}{ \
 (a) += H ((b), (c), (d)) + (x) + (uint32_t)(ac); \
 (a) = ROTATE_LEFT ((a), (s)); \
 (a) += (b); \
  }
\end{verbatim}
\end{Code}


Definition at line 111 of file md5c.c.\index{md5c.c@{md5c.c}!I@{I}}
\index{I@{I}!md5c.c@{md5c.c}}
\subsubsection[I]{\setlength{\rightskip}{0pt plus 5cm}\#define I(x, \/  y, \/  z)~((y) $^\wedge$ ((x) $|$ ($\sim$z)))}\label{md5c_8c_c0eafdc9ee161b71e7af98af736952fd}




Definition at line 92 of file md5c.c.\index{md5c.c@{md5c.c}!II@{II}}
\index{II@{II}!md5c.c@{md5c.c}}
\subsubsection[II]{\setlength{\rightskip}{0pt plus 5cm}\#define II({\bf a}, \/  b, \/  c, \/  d, \/  x, \/  {\bf s}, \/  ac)}\label{md5c_8c_d26626e5efb37b2dadef4e88e35e4329}


\textbf{Value:}

\begin{Code}\begin{verbatim}{ \
 (a) += I ((b), (c), (d)) + (x) + (uint32_t)(ac); \
 (a) = ROTATE_LEFT ((a), (s)); \
 (a) += (b); \
  }
\end{verbatim}
\end{Code}


Definition at line 116 of file md5c.c.\index{md5c.c@{md5c.c}!ROTATE\_\-LEFT@{ROTATE\_\-LEFT}}
\index{ROTATE\_\-LEFT@{ROTATE\_\-LEFT}!md5c.c@{md5c.c}}
\subsubsection[ROTATE\_\-LEFT]{\setlength{\rightskip}{0pt plus 5cm}\#define ROTATE\_\-LEFT(x, \/  n)~(((x) $<$$<$ (n)) $|$ ((x) $>$$>$ (32-(n))))}\label{md5c_8c_7417fd4e875360c0533fa5b412cdab49}




Definition at line 96 of file md5c.c.\index{md5c.c@{md5c.c}!S11@{S11}}
\index{S11@{S11}!md5c.c@{md5c.c}}
\subsubsection[S11]{\setlength{\rightskip}{0pt plus 5cm}\#define S11~7}\label{md5c_8c_51398c0e5541164ad4d6615880073305}




Definition at line 54 of file md5c.c.\index{md5c.c@{md5c.c}!S12@{S12}}
\index{S12@{S12}!md5c.c@{md5c.c}}
\subsubsection[S12]{\setlength{\rightskip}{0pt plus 5cm}\#define S12~12}\label{md5c_8c_1ec499cd0e54ecc28c2ac2afea5b038e}




Definition at line 55 of file md5c.c.\index{md5c.c@{md5c.c}!S13@{S13}}
\index{S13@{S13}!md5c.c@{md5c.c}}
\subsubsection[S13]{\setlength{\rightskip}{0pt plus 5cm}\#define S13~17}\label{md5c_8c_aeec90429105fb54d853dd4fc7027a54}




Definition at line 56 of file md5c.c.\index{md5c.c@{md5c.c}!S14@{S14}}
\index{S14@{S14}!md5c.c@{md5c.c}}
\subsubsection[S14]{\setlength{\rightskip}{0pt plus 5cm}\#define S14~22}\label{md5c_8c_78342b0ccde2ed12fdf19a113cc266cf}




Definition at line 57 of file md5c.c.\index{md5c.c@{md5c.c}!S21@{S21}}
\index{S21@{S21}!md5c.c@{md5c.c}}
\subsubsection[S21]{\setlength{\rightskip}{0pt plus 5cm}\#define S21~5}\label{md5c_8c_b6d5354f647a0e7592a1f051fc8377b2}




Definition at line 58 of file md5c.c.\index{md5c.c@{md5c.c}!S22@{S22}}
\index{S22@{S22}!md5c.c@{md5c.c}}
\subsubsection[S22]{\setlength{\rightskip}{0pt plus 5cm}\#define S22~9}\label{md5c_8c_ddad30455da936bc1879ee9c72b46d59}




Definition at line 59 of file md5c.c.\index{md5c.c@{md5c.c}!S23@{S23}}
\index{S23@{S23}!md5c.c@{md5c.c}}
\subsubsection[S23]{\setlength{\rightskip}{0pt plus 5cm}\#define S23~14}\label{md5c_8c_6321a8b29628936f76e9e78cf5bda95f}




Definition at line 60 of file md5c.c.\index{md5c.c@{md5c.c}!S24@{S24}}
\index{S24@{S24}!md5c.c@{md5c.c}}
\subsubsection[S24]{\setlength{\rightskip}{0pt plus 5cm}\#define S24~20}\label{md5c_8c_0c09eb77d30a0d5f9154914147b86c20}




Definition at line 61 of file md5c.c.\index{md5c.c@{md5c.c}!S31@{S31}}
\index{S31@{S31}!md5c.c@{md5c.c}}
\subsubsection[S31]{\setlength{\rightskip}{0pt plus 5cm}\#define S31~4}\label{md5c_8c_ef26590f8a880ee6f4a158168defcd89}




Definition at line 62 of file md5c.c.\index{md5c.c@{md5c.c}!S32@{S32}}
\index{S32@{S32}!md5c.c@{md5c.c}}
\subsubsection[S32]{\setlength{\rightskip}{0pt plus 5cm}\#define S32~11}\label{md5c_8c_1d512424dd8a91e0a5bcc98563f33914}




Definition at line 63 of file md5c.c.\index{md5c.c@{md5c.c}!S33@{S33}}
\index{S33@{S33}!md5c.c@{md5c.c}}
\subsubsection[S33]{\setlength{\rightskip}{0pt plus 5cm}\#define S33~16}\label{md5c_8c_1c854214533f6220e859b0063196abb3}




Definition at line 64 of file md5c.c.\index{md5c.c@{md5c.c}!S34@{S34}}
\index{S34@{S34}!md5c.c@{md5c.c}}
\subsubsection[S34]{\setlength{\rightskip}{0pt plus 5cm}\#define S34~23}\label{md5c_8c_f6472be1d535970afee8e5266a74aa07}




Definition at line 65 of file md5c.c.\index{md5c.c@{md5c.c}!S41@{S41}}
\index{S41@{S41}!md5c.c@{md5c.c}}
\subsubsection[S41]{\setlength{\rightskip}{0pt plus 5cm}\#define S41~6}\label{md5c_8c_b674ba129e588da55d1d494e1cf3c15e}




Definition at line 66 of file md5c.c.\index{md5c.c@{md5c.c}!S42@{S42}}
\index{S42@{S42}!md5c.c@{md5c.c}}
\subsubsection[S42]{\setlength{\rightskip}{0pt plus 5cm}\#define S42~10}\label{md5c_8c_268ef1a49114a94b931cc6b313e3cd1b}




Definition at line 67 of file md5c.c.\index{md5c.c@{md5c.c}!S43@{S43}}
\index{S43@{S43}!md5c.c@{md5c.c}}
\subsubsection[S43]{\setlength{\rightskip}{0pt plus 5cm}\#define S43~15}\label{md5c_8c_5aaa7121f39650d472746942ca68f959}




Definition at line 68 of file md5c.c.\index{md5c.c@{md5c.c}!S44@{S44}}
\index{S44@{S44}!md5c.c@{md5c.c}}
\subsubsection[S44]{\setlength{\rightskip}{0pt plus 5cm}\#define S44~21}\label{md5c_8c_6a3989af72b55d169bd73a66f8620aae}




Definition at line 69 of file md5c.c.

\subsection{Typedef Documentation}
\index{md5c.c@{md5c.c}!POINTER@{POINTER}}
\index{POINTER@{POINTER}!md5c.c@{md5c.c}}
\subsubsection[POINTER]{\setlength{\rightskip}{0pt plus 5cm}typedef unsigned char$\ast$ {\bf POINTER}}\label{md5c_8c_73204e40637f83518fb695362ea084a4}




Definition at line 50 of file md5c.c.

\subsection{Function Documentation}
\index{md5c.c@{md5c.c}!MD5Final@{MD5Final}}
\index{MD5Final@{MD5Final}!md5c.c@{md5c.c}}
\subsubsection[MD5Final]{\setlength{\rightskip}{0pt plus 5cm}void MD5Final (digest, \/  {\bf MD5\_\-CTX} $\ast$ {\em context})}\label{md5c_8c_6265921688d4d2f4fb2456dfe7a2828a}




Definition at line 213 of file md5c.c.

References gen\_\-regs::bits, MD5Context::count, Encode, MD5Update(), and MD5Context::state.\index{md5c.c@{md5c.c}!MD5Init@{MD5Init}}
\index{MD5Init@{MD5Init}!md5c.c@{md5c.c}}
\subsubsection[MD5Init]{\setlength{\rightskip}{0pt plus 5cm}void MD5Init ({\bf MD5\_\-CTX} $\ast$ {\em context})}\label{md5c_8c_08e47999152d737f33fda2b8729c4f7c}




Definition at line 159 of file md5c.c.

Referenced by HMAC\_\-MD5().\index{md5c.c@{md5c.c}!MD5Update@{MD5Update}}
\index{MD5Update@{MD5Update}!md5c.c@{md5c.c}}
\subsubsection[MD5Update]{\setlength{\rightskip}{0pt plus 5cm}void MD5Update ({\bf MD5\_\-CTX} $\ast$ {\em context}, \/  const unsigned char $\ast$ {\em input}, \/  unsigned int {\em inputLen})}\label{md5c_8c_82247df9248c50d1c25809174a84dddd}




Definition at line 174 of file md5c.c.

Referenced by HMAC\_\-MD5(), and MD5Final().