\hypertarget{group__wickr__stream__key}{}\doxysection{wickr\+\_\+stream\+\_\+key}
\label{group__wickr__stream__key}\index{wickr\_stream\_key@{wickr\_stream\_key}}
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key}}
\begin{DoxyCompactList}\small\item\em A data structure representing the stream encoding / decoding key material A stream key holds information about the key material used for cipher operations as well as it\textquotesingle{}s next evolution key and the number of packets this key should be used to encode or decode before evolution takes place. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__stream__key_ga54449667a25d9e64cd04dae58dd76418}{wickr\+\_\+stream\+\_\+key\+\_\+create}} (\mbox{\hyperlink{structwickr__cipher__key}{wickr\+\_\+cipher\+\_\+key\+\_\+t}} $\ast$cipher\+\_\+key, \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$evolution\+\_\+key, uint32\+\_\+t packets\+\_\+per\+\_\+evolution)
\item 
\mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__stream__key_gaff8e766f3519e9e73157938bd1d3e024}{wickr\+\_\+stream\+\_\+key\+\_\+create\+\_\+user\+\_\+data}} (\mbox{\hyperlink{structwickr__cipher__key}{wickr\+\_\+cipher\+\_\+key\+\_\+t}} $\ast$cipher\+\_\+key, \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$evolution\+\_\+key, uint32\+\_\+t packets\+\_\+per\+\_\+evolution, \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$user\+\_\+data)
\item 
\mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__stream__key_ga9e95dd486dbe2f3db647c65042601b34}{wickr\+\_\+stream\+\_\+key\+\_\+create\+\_\+rand}} (const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} engine, \mbox{\hyperlink{structwickr__cipher}{wickr\+\_\+cipher\+\_\+t}} cipher, uint32\+\_\+t packets\+\_\+per\+\_\+evolution)
\item 
\mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__stream__key_ga0201dd73adf773834d7dbb4bbc307fae}{wickr\+\_\+stream\+\_\+key\+\_\+copy}} (const \mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key\+\_\+t}} $\ast$stream\+\_\+key)
\item 
\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__stream__key_gae1540c98a88e2f62e96fb2ee209e2290}{wickr\+\_\+stream\+\_\+key\+\_\+serialize}} (const \mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key\+\_\+t}} $\ast$key)
\item 
\mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__stream__key_gadf1565329fed927531e1a14334ed23e4}{wickr\+\_\+stream\+\_\+key\+\_\+create\+\_\+from\+\_\+buffer}} (const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$buffer)
\item 
void \mbox{\hyperlink{group__wickr__stream__key_ga3bb3dec760c5b7f3a1bd2d0bb13bcc79}{wickr\+\_\+stream\+\_\+key\+\_\+destroy}} (\mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key\+\_\+t}} $\ast$$\ast$stream\+\_\+key)
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__wickr__stream__key_ga0201dd73adf773834d7dbb4bbc307fae}\label{group__wickr__stream__key_ga0201dd73adf773834d7dbb4bbc307fae}} 
\index{wickr\_stream\_key@{wickr\_stream\_key}!wickr\_stream\_key\_copy@{wickr\_stream\_key\_copy}}
\index{wickr\_stream\_key\_copy@{wickr\_stream\_key\_copy}!wickr\_stream\_key@{wickr\_stream\_key}}
\doxysubsubsection{\texorpdfstring{wickr\_stream\_key\_copy()}{wickr\_stream\_key\_copy()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key\+\_\+t}}$\ast$ wickr\+\_\+stream\+\_\+key\+\_\+copy (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key\+\_\+t}} $\ast$}]{stream\+\_\+key }\end{DoxyParamCaption})}

Copy a stream key


\begin{DoxyParams}{Parameters}
{\em stream\+\_\+key} & the stream key to copy \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated stream key holding a deep copy of properties from \textquotesingle{}stream\+\_\+key\textquotesingle{} 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__stream__key_ga54449667a25d9e64cd04dae58dd76418}\label{group__wickr__stream__key_ga54449667a25d9e64cd04dae58dd76418}} 
\index{wickr\_stream\_key@{wickr\_stream\_key}!wickr\_stream\_key\_create@{wickr\_stream\_key\_create}}
\index{wickr\_stream\_key\_create@{wickr\_stream\_key\_create}!wickr\_stream\_key@{wickr\_stream\_key}}
\doxysubsubsection{\texorpdfstring{wickr\_stream\_key\_create()}{wickr\_stream\_key\_create()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key\+\_\+t}}$\ast$ wickr\+\_\+stream\+\_\+key\+\_\+create (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structwickr__cipher__key}{wickr\+\_\+cipher\+\_\+key\+\_\+t}} $\ast$}]{cipher\+\_\+key,  }\item[{\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{evolution\+\_\+key,  }\item[{uint32\+\_\+t}]{packets\+\_\+per\+\_\+evolution }\end{DoxyParamCaption})}

Create a stream key from components


\begin{DoxyParams}{Parameters}
{\em cipher\+\_\+key} & see documentation of \textquotesingle{}\mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key}}\textquotesingle{} structure \\
\hline
{\em evolution\+\_\+key} & see documentation of \textquotesingle{}\mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key}}\textquotesingle{} structure \\
\hline
{\em packets\+\_\+per\+\_\+evolution} & see documentation of \textquotesingle{}\mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key}}\textquotesingle{} structure \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated stream key owning the properties passed in 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__stream__key_gadf1565329fed927531e1a14334ed23e4}\label{group__wickr__stream__key_gadf1565329fed927531e1a14334ed23e4}} 
\index{wickr\_stream\_key@{wickr\_stream\_key}!wickr\_stream\_key\_create\_from\_buffer@{wickr\_stream\_key\_create\_from\_buffer}}
\index{wickr\_stream\_key\_create\_from\_buffer@{wickr\_stream\_key\_create\_from\_buffer}!wickr\_stream\_key@{wickr\_stream\_key}}
\doxysubsubsection{\texorpdfstring{wickr\_stream\_key\_create\_from\_buffer()}{wickr\_stream\_key\_create\_from\_buffer()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key\+\_\+t}}$\ast$ wickr\+\_\+stream\+\_\+key\+\_\+create\+\_\+from\+\_\+buffer (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{buffer }\end{DoxyParamCaption})}

Create a stream key from a serialized buffer


\begin{DoxyParams}{Parameters}
{\em buffer} & the buffer to parse into a stream key \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated stream key represented by \textquotesingle{}buffer\textquotesingle{} or NULL if parsing buffer fails 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__stream__key_ga9e95dd486dbe2f3db647c65042601b34}\label{group__wickr__stream__key_ga9e95dd486dbe2f3db647c65042601b34}} 
\index{wickr\_stream\_key@{wickr\_stream\_key}!wickr\_stream\_key\_create\_rand@{wickr\_stream\_key\_create\_rand}}
\index{wickr\_stream\_key\_create\_rand@{wickr\_stream\_key\_create\_rand}!wickr\_stream\_key@{wickr\_stream\_key}}
\doxysubsubsection{\texorpdfstring{wickr\_stream\_key\_create\_rand()}{wickr\_stream\_key\_create\_rand()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key\+\_\+t}}$\ast$ wickr\+\_\+stream\+\_\+key\+\_\+create\+\_\+rand (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}}}]{engine,  }\item[{\mbox{\hyperlink{structwickr__cipher}{wickr\+\_\+cipher\+\_\+t}}}]{cipher,  }\item[{uint32\+\_\+t}]{packets\+\_\+per\+\_\+evolution }\end{DoxyParamCaption})}

Generate a random stream key


\begin{DoxyParams}{Parameters}
{\em engine} & the crypto engine to use for secure random cipher key generation \\
\hline
{\em cipher} & the cipher to use for generation of the internal \textquotesingle{}cipher\+\_\+key\textquotesingle{} property \\
\hline
{\em packets\+\_\+per\+\_\+evolution} & the number of times this key should be used before it evoloves \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated stream key 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__stream__key_gaff8e766f3519e9e73157938bd1d3e024}\label{group__wickr__stream__key_gaff8e766f3519e9e73157938bd1d3e024}} 
\index{wickr\_stream\_key@{wickr\_stream\_key}!wickr\_stream\_key\_create\_user\_data@{wickr\_stream\_key\_create\_user\_data}}
\index{wickr\_stream\_key\_create\_user\_data@{wickr\_stream\_key\_create\_user\_data}!wickr\_stream\_key@{wickr\_stream\_key}}
\doxysubsubsection{\texorpdfstring{wickr\_stream\_key\_create\_user\_data()}{wickr\_stream\_key\_create\_user\_data()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key\+\_\+t}}$\ast$ wickr\+\_\+stream\+\_\+key\+\_\+create\+\_\+user\+\_\+data (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structwickr__cipher__key}{wickr\+\_\+cipher\+\_\+key\+\_\+t}} $\ast$}]{cipher\+\_\+key,  }\item[{\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{evolution\+\_\+key,  }\item[{uint32\+\_\+t}]{packets\+\_\+per\+\_\+evolution,  }\item[{\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{user\+\_\+data }\end{DoxyParamCaption})}

Create a stream key from components with user data


\begin{DoxyParams}{Parameters}
{\em cipher\+\_\+key} & see documentation of \textquotesingle{}\mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key}}\textquotesingle{} structure \\
\hline
{\em evolution\+\_\+key} & see documentation of \textquotesingle{}\mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key}}\textquotesingle{} structure \\
\hline
{\em packets\+\_\+per\+\_\+evolution} & see documentation of \textquotesingle{}\mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key}}\textquotesingle{} structure \\
\hline
{\em user\+\_\+data} & see documentation of \textquotesingle{}\mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key}}\textquotesingle{} structure \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated stream key owning the properties passed in 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__stream__key_ga3bb3dec760c5b7f3a1bd2d0bb13bcc79}\label{group__wickr__stream__key_ga3bb3dec760c5b7f3a1bd2d0bb13bcc79}} 
\index{wickr\_stream\_key@{wickr\_stream\_key}!wickr\_stream\_key\_destroy@{wickr\_stream\_key\_destroy}}
\index{wickr\_stream\_key\_destroy@{wickr\_stream\_key\_destroy}!wickr\_stream\_key@{wickr\_stream\_key}}
\doxysubsubsection{\texorpdfstring{wickr\_stream\_key\_destroy()}{wickr\_stream\_key\_destroy()}}
{\footnotesize\ttfamily void wickr\+\_\+stream\+\_\+key\+\_\+destroy (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key\+\_\+t}} $\ast$$\ast$}]{stream\+\_\+key }\end{DoxyParamCaption})}

Destroy a stream key


\begin{DoxyParams}{Parameters}
{\em stream\+\_\+key} & a pointer to the stream key to destroy. All properties of \textquotesingle{}$\ast$stream\+\_\+key\textquotesingle{} will also be destroyed \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__wickr__stream__key_gae1540c98a88e2f62e96fb2ee209e2290}\label{group__wickr__stream__key_gae1540c98a88e2f62e96fb2ee209e2290}} 
\index{wickr\_stream\_key@{wickr\_stream\_key}!wickr\_stream\_key\_serialize@{wickr\_stream\_key\_serialize}}
\index{wickr\_stream\_key\_serialize@{wickr\_stream\_key\_serialize}!wickr\_stream\_key@{wickr\_stream\_key}}
\doxysubsubsection{\texorpdfstring{wickr\_stream\_key\_serialize()}{wickr\_stream\_key\_serialize()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}}$\ast$ wickr\+\_\+stream\+\_\+key\+\_\+serialize (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__stream__key}{wickr\+\_\+stream\+\_\+key\+\_\+t}} $\ast$}]{key }\end{DoxyParamCaption})}

Serialize a stream key


\begin{DoxyParams}{Parameters}
{\em key} & the key to serialize \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a serialized protocol buffer object representing the properties of \textquotesingle{}key\textquotesingle{} 
\end{DoxyReturn}
