\doxysection{sha1.\+h}
\label{sha1_8h_source}\index{src/gsm/kdf/sha1.h@{src/gsm/kdf/sha1.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{comment}{/*}}
\DoxyCodeLine{2 \textcolor{comment}{ * SHA1 hash implementation and interface functions}}
\DoxyCodeLine{3 \textcolor{comment}{ * Copyright (c) 2003-\/2009, Jouni Malinen <j@w1.fi>}}
\DoxyCodeLine{4 \textcolor{comment}{ *}}
\DoxyCodeLine{5 \textcolor{comment}{ * This program is free software; you can redistribute it and/or modify}}
\DoxyCodeLine{6 \textcolor{comment}{ * it under the terms of the GNU General Public License version 2 as}}
\DoxyCodeLine{7 \textcolor{comment}{ * published by the Free Software Foundation.}}
\DoxyCodeLine{8 \textcolor{comment}{ *}}
\DoxyCodeLine{9 \textcolor{comment}{ * Alternatively, this software may be distributed under the terms of BSD}}
\DoxyCodeLine{10 \textcolor{comment}{ * license.}}
\DoxyCodeLine{11 \textcolor{comment}{ *}}
\DoxyCodeLine{12 \textcolor{comment}{ * See README and COPYING for more details.}}
\DoxyCodeLine{13 \textcolor{comment}{ */}}
\DoxyCodeLine{14 }
\DoxyCodeLine{15 \textcolor{preprocessor}{\#ifndef SHA1\_H}}
\DoxyCodeLine{16 \textcolor{preprocessor}{\#define SHA1\_H}}
\DoxyCodeLine{17 }
\DoxyCodeLine{18 \textcolor{preprocessor}{\#define SHA1\_MAC\_LEN 20}}
\DoxyCodeLine{19 }
\DoxyCodeLine{20 \textcolor{keywordtype}{int} hmac\_sha1\_vector(\textcolor{keyword}{const} u8 *key, \textcolor{keywordtype}{size\_t} key\_len, \textcolor{keywordtype}{size\_t} num\_elem,}
\DoxyCodeLine{21                      \textcolor{keyword}{const} u8 *addr[], \textcolor{keyword}{const} \textcolor{keywordtype}{size\_t} *len, u8 *mac);}
\DoxyCodeLine{22 \textcolor{keywordtype}{int} hmac\_sha1(\textcolor{keyword}{const} u8 *key, \textcolor{keywordtype}{size\_t} key\_len, \textcolor{keyword}{const} u8 *data, \textcolor{keywordtype}{size\_t} data\_len,}
\DoxyCodeLine{23                u8 *mac);}
\DoxyCodeLine{24 \textcolor{keywordtype}{int} sha1\_prf(\textcolor{keyword}{const} u8 *key, \textcolor{keywordtype}{size\_t} key\_len, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *label,}
\DoxyCodeLine{25              \textcolor{keyword}{const} u8 *data, \textcolor{keywordtype}{size\_t} data\_len, u8 *buf, \textcolor{keywordtype}{size\_t} buf\_len);}
\DoxyCodeLine{26 \textcolor{keywordtype}{int} sha1\_t\_prf(\textcolor{keyword}{const} u8 *key, \textcolor{keywordtype}{size\_t} key\_len, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *label,}
\DoxyCodeLine{27                \textcolor{keyword}{const} u8 *seed, \textcolor{keywordtype}{size\_t} seed\_len, u8 *buf, \textcolor{keywordtype}{size\_t} buf\_len);}
\DoxyCodeLine{28 \textcolor{keywordtype}{int} \_\_must\_check tls\_prf\_sha1\_md5(\textcolor{keyword}{const} u8 *secret, \textcolor{keywordtype}{size\_t} secret\_len,}
\DoxyCodeLine{29                                   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *label, \textcolor{keyword}{const} u8 *seed,}
\DoxyCodeLine{30                                   \textcolor{keywordtype}{size\_t} seed\_len, u8 *out, \textcolor{keywordtype}{size\_t} outlen);}
\DoxyCodeLine{31 \textcolor{keywordtype}{int} pbkdf2\_sha1(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *passphrase, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *ssid, \textcolor{keywordtype}{size\_t} ssid\_len,}
\DoxyCodeLine{32                 \textcolor{keywordtype}{int} iterations, u8 *buf, \textcolor{keywordtype}{size\_t} buflen);}
\DoxyCodeLine{33 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* SHA1\_H */}\textcolor{preprocessor}{}}

\end{DoxyCode}
