\hypertarget{group__wickr__dev__info}{}\doxysection{Wickr\+\_\+dev\+\_\+info}
\label{group__wickr__dev__info}\index{Wickr\_dev\_info@{Wickr\_dev\_info}}
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structwickr__dev__info}{wickr\+\_\+dev\+\_\+info}}
\begin{DoxyCompactList}\small\item\em Device Information used to make a uniquely identifying set of data for each context running the Wickr Protocol. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{structwickr__dev__info}{wickr\+\_\+dev\+\_\+info\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__dev__info_gaadd5ceb4c6ed757440332e8e27109e5e}{wickr\+\_\+dev\+\_\+info\+\_\+create}} (\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$dev\+\_\+salt, \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$system\+\_\+salt, \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$msg\+\_\+proto\+\_\+id, \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$srv\+\_\+comm\+\_\+id)
\item 
\mbox{\hyperlink{structwickr__dev__info}{wickr\+\_\+dev\+\_\+info\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__dev__info_gadbe4731cffb188da317ed9237826ac5d}{wickr\+\_\+dev\+\_\+info\+\_\+create\+\_\+new}} (const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$crypto, const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$system\+\_\+id)
\item 
\mbox{\hyperlink{structwickr__dev__info}{wickr\+\_\+dev\+\_\+info\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__dev__info_ga7f81b96fc222560762d608772b3f44bd}{wickr\+\_\+dev\+\_\+info\+\_\+derive}} (const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$crypto, \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$dev\+\_\+salt, const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$system\+\_\+id)
\item 
\mbox{\hyperlink{structwickr__dev__info}{wickr\+\_\+dev\+\_\+info\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__dev__info_ga1c9d2bdc1778166c49aec43906bb1a83}{wickr\+\_\+dev\+\_\+info\+\_\+copy}} (const \mbox{\hyperlink{structwickr__dev__info}{wickr\+\_\+dev\+\_\+info\+\_\+t}} $\ast$info)
\item 
void \mbox{\hyperlink{group__wickr__dev__info_ga09ee324a0e0e6a0451aa53031eecb324}{wickr\+\_\+dev\+\_\+info\+\_\+destroy}} (\mbox{\hyperlink{structwickr__dev__info}{wickr\+\_\+dev\+\_\+info\+\_\+t}} $\ast$$\ast$info)
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__wickr__dev__info_ga1c9d2bdc1778166c49aec43906bb1a83}\label{group__wickr__dev__info_ga1c9d2bdc1778166c49aec43906bb1a83}} 
\index{Wickr\_dev\_info@{Wickr\_dev\_info}!wickr\_dev\_info\_copy@{wickr\_dev\_info\_copy}}
\index{wickr\_dev\_info\_copy@{wickr\_dev\_info\_copy}!Wickr\_dev\_info@{Wickr\_dev\_info}}
\doxysubsubsection{\texorpdfstring{wickr\_dev\_info\_copy()}{wickr\_dev\_info\_copy()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__dev__info}{wickr\+\_\+dev\+\_\+info\+\_\+t}}$\ast$ wickr\+\_\+dev\+\_\+info\+\_\+copy (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__dev__info}{wickr\+\_\+dev\+\_\+info\+\_\+t}} $\ast$}]{info }\end{DoxyParamCaption})}

Copy a device info set


\begin{DoxyParams}{Parameters}
{\em info} & the source info to copy \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated device info set containing deep copies of the properties of \textquotesingle{}info\textquotesingle{} 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__dev__info_gaadd5ceb4c6ed757440332e8e27109e5e}\label{group__wickr__dev__info_gaadd5ceb4c6ed757440332e8e27109e5e}} 
\index{Wickr\_dev\_info@{Wickr\_dev\_info}!wickr\_dev\_info\_create@{wickr\_dev\_info\_create}}
\index{wickr\_dev\_info\_create@{wickr\_dev\_info\_create}!Wickr\_dev\_info@{Wickr\_dev\_info}}
\doxysubsubsection{\texorpdfstring{wickr\_dev\_info\_create()}{wickr\_dev\_info\_create()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__dev__info}{wickr\+\_\+dev\+\_\+info\+\_\+t}}$\ast$ wickr\+\_\+dev\+\_\+info\+\_\+create (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{dev\+\_\+salt,  }\item[{\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{system\+\_\+salt,  }\item[{\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{msg\+\_\+proto\+\_\+id,  }\item[{\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{srv\+\_\+comm\+\_\+id }\end{DoxyParamCaption})}

Create a device info set from components


\begin{DoxyParams}{Parameters}
{\em dev\+\_\+salt} & random salt, see property declaration of \textquotesingle{}\mbox{\hyperlink{structwickr__dev__info}{wickr\+\_\+dev\+\_\+info}}\textquotesingle{} \\
\hline
{\em system\+\_\+salt} & system bound salt, see property declaration of \textquotesingle{}\mbox{\hyperlink{structwickr__dev__info}{wickr\+\_\+dev\+\_\+info}}\textquotesingle{} \\
\hline
{\em msg\+\_\+proto\+\_\+id} & messaging protocol identifier, see property declaration of \textquotesingle{}\mbox{\hyperlink{structwickr__dev__info}{wickr\+\_\+dev\+\_\+info}}\textquotesingle{} \\
\hline
{\em srv\+\_\+comm\+\_\+id} & server communication identifier, see property declaration of \textquotesingle{}\mbox{\hyperlink{structwickr__dev__info}{wickr\+\_\+dev\+\_\+info}}\textquotesingle{} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated device info set owning the properties passed in 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__dev__info_gadbe4731cffb188da317ed9237826ac5d}\label{group__wickr__dev__info_gadbe4731cffb188da317ed9237826ac5d}} 
\index{Wickr\_dev\_info@{Wickr\_dev\_info}!wickr\_dev\_info\_create\_new@{wickr\_dev\_info\_create\_new}}
\index{wickr\_dev\_info\_create\_new@{wickr\_dev\_info\_create\_new}!Wickr\_dev\_info@{Wickr\_dev\_info}}
\doxysubsubsection{\texorpdfstring{wickr\_dev\_info\_create\_new()}{wickr\_dev\_info\_create\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__dev__info}{wickr\+\_\+dev\+\_\+info\+\_\+t}}$\ast$ wickr\+\_\+dev\+\_\+info\+\_\+create\+\_\+new (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$}]{crypto,  }\item[{const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{system\+\_\+id }\end{DoxyParamCaption})}

Generate a new randomized device info set from a system identifier. This function uses crypto engine \textquotesingle{}crypto\textquotesingle{} to generate a random \textquotesingle{}dev\+\_\+salt\textquotesingle{} value, and then calls \textquotesingle{}wickr\+\_\+dev\+\_\+info\+\_\+derive\textquotesingle{} with the resulting random \textquotesingle{}dev\+\_\+salt\textquotesingle{}, crypto engine, and provided \textquotesingle{}system\+\_\+id\textquotesingle{} values


\begin{DoxyParams}{Parameters}
{\em crypto} & a crypto engine that supports a PRNG, SHA512, and SHA256 functions \\
\hline
{\em system\+\_\+id} & a buffer representing data optimally unique to your system. It is used as the basis of generating the \textquotesingle{}system\+\_\+salt\textquotesingle{} property. See property declaration of \textquotesingle{}system\+\_\+salt\textquotesingle{} in \textquotesingle{}\mbox{\hyperlink{structwickr__dev__info}{wickr\+\_\+dev\+\_\+info}}\textquotesingle{} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the output of \textquotesingle{}wickr\+\_\+dev\+\_\+info\+\_\+derive\textquotesingle{} with a randomly generated \textquotesingle{}dev\+\_\+salt\textquotesingle{} 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__dev__info_ga7f81b96fc222560762d608772b3f44bd}\label{group__wickr__dev__info_ga7f81b96fc222560762d608772b3f44bd}} 
\index{Wickr\_dev\_info@{Wickr\_dev\_info}!wickr\_dev\_info\_derive@{wickr\_dev\_info\_derive}}
\index{wickr\_dev\_info\_derive@{wickr\_dev\_info\_derive}!Wickr\_dev\_info@{Wickr\_dev\_info}}
\doxysubsubsection{\texorpdfstring{wickr\_dev\_info\_derive()}{wickr\_dev\_info\_derive()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__dev__info}{wickr\+\_\+dev\+\_\+info\+\_\+t}}$\ast$ wickr\+\_\+dev\+\_\+info\+\_\+derive (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$}]{crypto,  }\item[{\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{dev\+\_\+salt,  }\item[{const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{system\+\_\+id }\end{DoxyParamCaption})}

Derive a set of salt values and identifiers. Creates \textquotesingle{}system\+\_\+salt\textquotesingle{} by taking a SHA256 hash of the system\+\_\+id. Creates \textquotesingle{}msg\+\_\+proto\+\_\+id\textquotesingle{}, and \textquotesingle{}srv\+\_\+comm\+\_\+id\textquotesingle{} properties by taking a SHA512 of of \textquotesingle{}system\+\_\+id\textquotesingle{} using \textquotesingle{}dev\+\_\+salt\textquotesingle{} as a salt, and then splits by using the first 32 bytes as \textquotesingle{}msg\+\_\+proto\+\_\+id\textquotesingle{}, and the last 32 bytes as \textquotesingle{}srv\+\_\+comm\+\_\+id\textquotesingle{}


\begin{DoxyParams}{Parameters}
{\em crypto} & a crypto engine that supports a PRNG, SHA512, and SHA256 functions \\
\hline
{\em dev\+\_\+salt} & a randomly generated device salt to be used as input for generating identifiers \\
\hline
{\em system\+\_\+id} & a system level identifier to be used as input to generating a \textquotesingle{}system\+\_\+salt\textquotesingle{} value, as well as identifiers \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated device info set owning the reference to dev\+\_\+salt, and with newly generated values for \textquotesingle{}system\+\_\+salt\textquotesingle{}, \textquotesingle{}msg\+\_\+proto\+\_\+id\textquotesingle{}, and \textquotesingle{}srv\+\_\+comm\+\_\+id\textquotesingle{}. NULL if derivation fails 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__dev__info_ga09ee324a0e0e6a0451aa53031eecb324}\label{group__wickr__dev__info_ga09ee324a0e0e6a0451aa53031eecb324}} 
\index{Wickr\_dev\_info@{Wickr\_dev\_info}!wickr\_dev\_info\_destroy@{wickr\_dev\_info\_destroy}}
\index{wickr\_dev\_info\_destroy@{wickr\_dev\_info\_destroy}!Wickr\_dev\_info@{Wickr\_dev\_info}}
\doxysubsubsection{\texorpdfstring{wickr\_dev\_info\_destroy()}{wickr\_dev\_info\_destroy()}}
{\footnotesize\ttfamily void wickr\+\_\+dev\+\_\+info\+\_\+destroy (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structwickr__dev__info}{wickr\+\_\+dev\+\_\+info\+\_\+t}} $\ast$$\ast$}]{info }\end{DoxyParamCaption})}

Destroy a device info set


\begin{DoxyParams}{Parameters}
{\em info} & a pointer to a device info set to destroy. Properties of \textquotesingle{}$\ast$info\textquotesingle{} will also be destroyed \\
\hline
\end{DoxyParams}
