\hypertarget{utils_8c_source}{}\doxysection{utils.\+c}
\label{utils_8c_source}\index{crypto/libsodium/utils.c@{crypto/libsodium/utils.c}}
\mbox{\hyperlink{utils_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00001}00001 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00002}00002 \textcolor{comment}{ * ISC License}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2013-\/2018}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00005}00005 \textcolor{comment}{ * Frank Denis <j at pureftpd dot org>}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00007}00007 \textcolor{comment}{ * Permission to use, copy, modify, and/or distribute this software for any}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00008}00008 \textcolor{comment}{ * purpose with or without fee is hereby granted, provided that the above}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00009}00009 \textcolor{comment}{ * copyright notice and this permission notice appear in all copies.}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00010}00010 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00011}00011 \textcolor{comment}{ * THE SOFTWARE IS PROVIDED "{}AS IS"{} AND THE AUTHOR DISCLAIMS ALL WARRANTIES}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00012}00012 \textcolor{comment}{ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00013}00013 \textcolor{comment}{ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00014}00014 \textcolor{comment}{ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00015}00015 \textcolor{comment}{ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00016}00016 \textcolor{comment}{ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00017}00017 \textcolor{comment}{ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00018}00018 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00019}00019 }
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00020}00020 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00021}\mbox{\hyperlink{utils_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00021}} \mbox{\hyperlink{utils_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00022}00022 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00023}00023 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00024}00024 }
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00025}00025 \textcolor{preprocessor}{\#include <sodium/utils.h>}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00026}00026 }
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00027}00027 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00028}\mbox{\hyperlink{utils_8c_a6a43f30a28903dddea4e718039e4fec0}{00028}} \mbox{\hyperlink{utils_8c_a6a43f30a28903dddea4e718039e4fec0}{sodium\_memzero}}(\textcolor{keywordtype}{void} *b, \textcolor{keywordtype}{size\_t} n)}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00029}00029 \{}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00030}00030         explicit\_bzero(b, n);}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00031}00031 \}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00032}00032 }
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00033}00033 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00034}\mbox{\hyperlink{utils_8c_a95cc7bf1671f6cc140fe21119f2e36e1}{00034}} \mbox{\hyperlink{utils_8c_a95cc7bf1671f6cc140fe21119f2e36e1}{sodium\_is\_zero}}(\textcolor{keyword}{const} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *n, \textcolor{keyword}{const} \textcolor{keywordtype}{size\_t} nlen)}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00035}00035 \{}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00036}00036     \textcolor{keywordtype}{size\_t}                 i;}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00037}00037     \textcolor{keyword}{volatile} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} d = 0U;}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00038}00038 }
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00039}00039     \textcolor{keywordflow}{for} (i = 0U; i < nlen; i++) \{}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00040}00040         d |= n[i];}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00041}00041     \}}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00042}00042     \textcolor{keywordflow}{return} 1 \& ((d -\/ 1) >> 8);}
\DoxyCodeLine{\Hypertarget{utils_8c_source_l00043}00043 \}}

\end{DoxyCode}
