\hypertarget{key__helper_8h}{}\section{src/key\+\_\+helper.h File Reference}
\label{key__helper_8h}\index{src/key\+\_\+helper.\+h@{src/key\+\_\+helper.\+h}}
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include \char`\"{}signal\+\_\+protocol\+\_\+types.\+h\char`\"{}}\newline
Include dependency graph for key\+\_\+helper.\+h\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=270pt]{key__helper_8h__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{key__helper_8h_ad2c413686d4122374039ea45b494beff}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+identity\+\_\+key\+\_\+pair} (\hyperlink{signal__protocol__types_8h_a2b29fe6c645390a72526c774c35ad457}{ratchet\+\_\+identity\+\_\+key\+\_\+pair} $\ast$$\ast$key\+\_\+pair, \hyperlink{structsignal__context}{signal\+\_\+context} $\ast$global\+\_\+context)
\item 
int \hyperlink{key__helper_8h_a2c69b0ecea5c387bdc42be354b7de387}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+registration\+\_\+id} (\hyperlink{uthash_8h_a435d1572bf3f880d55459d9805097f62}{uint32\+\_\+t} $\ast$registration\+\_\+id, int extended\+\_\+range, \hyperlink{structsignal__context}{signal\+\_\+context} $\ast$global\+\_\+context)
\item 
int \hyperlink{key__helper_8h_a0551fb17b70cce9140865d1c893be30f}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+get\+\_\+random\+\_\+sequence} (int $\ast$value, int max, \hyperlink{structsignal__context}{signal\+\_\+context} $\ast$global\+\_\+context)
\item 
int \hyperlink{key__helper_8h_a00fc658a9224a87eb08eaebe4cc17903}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+pre\+\_\+keys} (\hyperlink{signal__protocol__types_8h_af153890f9b52723e6cc43f3dff3b2ed6}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+pre\+\_\+key\+\_\+list\+\_\+node} $\ast$$\ast$head, unsigned int start, unsigned int count, \hyperlink{structsignal__context}{signal\+\_\+context} $\ast$global\+\_\+context)
\item 
\hyperlink{signal__protocol__types_8h_a91cbd5e46d509a69d7fd018d5018c889}{session\+\_\+pre\+\_\+key} $\ast$ \hyperlink{key__helper_8h_a8e35c52c7a3d46750b8339a978cb5785}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+element} (const \hyperlink{signal__protocol__types_8h_af153890f9b52723e6cc43f3dff3b2ed6}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+pre\+\_\+key\+\_\+list\+\_\+node} $\ast$node)
\item 
\hyperlink{signal__protocol__types_8h_af153890f9b52723e6cc43f3dff3b2ed6}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+pre\+\_\+key\+\_\+list\+\_\+node} $\ast$ \hyperlink{key__helper_8h_aedcb11009fb2be958e70b8d42ff82496}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+next} (const \hyperlink{signal__protocol__types_8h_af153890f9b52723e6cc43f3dff3b2ed6}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+pre\+\_\+key\+\_\+list\+\_\+node} $\ast$node)
\item 
void \hyperlink{key__helper_8h_a081e73ddae96c36bcc0dcba7333ada97}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+free} (\hyperlink{signal__protocol__types_8h_af153890f9b52723e6cc43f3dff3b2ed6}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+pre\+\_\+key\+\_\+list\+\_\+node} $\ast$head)
\item 
int \hyperlink{key__helper_8h_a5bd3ab4ba84a14dee25fce1ebcaa1057}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+signed\+\_\+pre\+\_\+key} (\hyperlink{signal__protocol__types_8h_a52e43d2d7af0b108957939886064be81}{session\+\_\+signed\+\_\+pre\+\_\+key} $\ast$$\ast$signed\+\_\+pre\+\_\+key, const \hyperlink{signal__protocol__types_8h_a2b29fe6c645390a72526c774c35ad457}{ratchet\+\_\+identity\+\_\+key\+\_\+pair} $\ast$identity\+\_\+key\+\_\+pair, \hyperlink{uthash_8h_a435d1572bf3f880d55459d9805097f62}{uint32\+\_\+t} signed\+\_\+pre\+\_\+key\+\_\+id, uint64\+\_\+t timestamp, \hyperlink{structsignal__context}{signal\+\_\+context} $\ast$global\+\_\+context)
\item 
int \hyperlink{key__helper_8h_a4e0813cdd11c7f79282f4a2c737e3ea7}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+signing\+\_\+key} (\hyperlink{signal__protocol__types_8h_ae66f8b39deda7e0ce46f3ee15561472a}{ec\+\_\+key\+\_\+pair} $\ast$$\ast$key\+\_\+pair, \hyperlink{structsignal__context}{signal\+\_\+context} $\ast$global\+\_\+context)
\item 
int \hyperlink{key__helper_8h_ae5da5c129015a9cd050b96d5e7291db8}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+key} (\hyperlink{structsignal__buffer}{signal\+\_\+buffer} $\ast$$\ast$key\+\_\+buffer, \hyperlink{structsignal__context}{signal\+\_\+context} $\ast$global\+\_\+context)
\item 
int \hyperlink{key__helper_8h_a4f5dfba3f9ddbc2320b5ebb11c27ed26}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+key\+\_\+id} (\hyperlink{uthash_8h_a435d1572bf3f880d55459d9805097f62}{uint32\+\_\+t} $\ast$key\+\_\+id, \hyperlink{structsignal__context}{signal\+\_\+context} $\ast$global\+\_\+context)
\end{DoxyCompactItemize}


\subsection{Function Documentation}
\mbox{\Hypertarget{key__helper_8h_ad2c413686d4122374039ea45b494beff}\label{key__helper_8h_ad2c413686d4122374039ea45b494beff}} 
\index{key\+\_\+helper.\+h@{key\+\_\+helper.\+h}!signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+identity\+\_\+key\+\_\+pair@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+identity\+\_\+key\+\_\+pair}}
\index{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+identity\+\_\+key\+\_\+pair@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+identity\+\_\+key\+\_\+pair}!key\+\_\+helper.\+h@{key\+\_\+helper.\+h}}
\subsubsection{\texorpdfstring{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+identity\+\_\+key\+\_\+pair()}{signal\_protocol\_key\_helper\_generate\_identity\_key\_pair()}}
{\footnotesize\ttfamily int signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+identity\+\_\+key\+\_\+pair (\begin{DoxyParamCaption}\item[{\hyperlink{signal__protocol__types_8h_a2b29fe6c645390a72526c774c35ad457}{ratchet\+\_\+identity\+\_\+key\+\_\+pair} $\ast$$\ast$}]{key\+\_\+pair,  }\item[{\hyperlink{structsignal__context}{signal\+\_\+context} $\ast$}]{global\+\_\+context }\end{DoxyParamCaption})}

Generate an identity key pair. Clients should only do this once, at install time.


\begin{DoxyParams}{Parameters}
{\em key\+\_\+pair} & the generated identity key pair \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, or negative on failure 
\end{DoxyReturn}
\mbox{\Hypertarget{key__helper_8h_a00fc658a9224a87eb08eaebe4cc17903}\label{key__helper_8h_a00fc658a9224a87eb08eaebe4cc17903}} 
\index{key\+\_\+helper.\+h@{key\+\_\+helper.\+h}!signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+pre\+\_\+keys@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+pre\+\_\+keys}}
\index{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+pre\+\_\+keys@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+pre\+\_\+keys}!key\+\_\+helper.\+h@{key\+\_\+helper.\+h}}
\subsubsection{\texorpdfstring{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+pre\+\_\+keys()}{signal\_protocol\_key\_helper\_generate\_pre\_keys()}}
{\footnotesize\ttfamily int signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+pre\+\_\+keys (\begin{DoxyParamCaption}\item[{\hyperlink{signal__protocol__types_8h_af153890f9b52723e6cc43f3dff3b2ed6}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+pre\+\_\+key\+\_\+list\+\_\+node} $\ast$$\ast$}]{head,  }\item[{unsigned int}]{start,  }\item[{unsigned int}]{count,  }\item[{\hyperlink{structsignal__context}{signal\+\_\+context} $\ast$}]{global\+\_\+context }\end{DoxyParamCaption})}

Generate a list of Pre\+Keys. Clients should do this at install time, and subsequently any time the list of Pre\+Keys stored on the server runs low.

Pre key I\+Ds are shorts, so they will eventually be repeated. Clients should store pre keys in a circular buffer, so that they are repeated as infrequently as possible.

When finished with this list, the caller should free it by calling \hyperlink{key__helper_8h_a081e73ddae96c36bcc0dcba7333ada97}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+free()}.


\begin{DoxyParams}{Parameters}
{\em head} & pointer to the head of the key list \\
\hline
{\em start} & the starting pre key ID, inclusive. \\
\hline
{\em count} & the number of pre keys to generate. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, or negative on failure 
\end{DoxyReturn}
\mbox{\Hypertarget{key__helper_8h_a2c69b0ecea5c387bdc42be354b7de387}\label{key__helper_8h_a2c69b0ecea5c387bdc42be354b7de387}} 
\index{key\+\_\+helper.\+h@{key\+\_\+helper.\+h}!signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+registration\+\_\+id@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+registration\+\_\+id}}
\index{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+registration\+\_\+id@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+registration\+\_\+id}!key\+\_\+helper.\+h@{key\+\_\+helper.\+h}}
\subsubsection{\texorpdfstring{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+registration\+\_\+id()}{signal\_protocol\_key\_helper\_generate\_registration\_id()}}
{\footnotesize\ttfamily int signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+registration\+\_\+id (\begin{DoxyParamCaption}\item[{\hyperlink{uthash_8h_a435d1572bf3f880d55459d9805097f62}{uint32\+\_\+t} $\ast$}]{registration\+\_\+id,  }\item[{int}]{extended\+\_\+range,  }\item[{\hyperlink{structsignal__context}{signal\+\_\+context} $\ast$}]{global\+\_\+context }\end{DoxyParamCaption})}

Generate a registration ID. Clients should only do this once, at install time.


\begin{DoxyParams}{Parameters}
{\em registration\+\_\+id} & set to the generated registration ID \\
\hline
{\em extended\+\_\+range} & By default (0), the generated registration ID is sized to require the minimal possible protobuf encoding overhead. Specify true (1) if the caller needs the full range of M\+A\+X\+\_\+\+I\+NT at the cost of slightly higher encoding overhead. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, or negative on failure 
\end{DoxyReturn}
\mbox{\Hypertarget{key__helper_8h_ae5da5c129015a9cd050b96d5e7291db8}\label{key__helper_8h_ae5da5c129015a9cd050b96d5e7291db8}} 
\index{key\+\_\+helper.\+h@{key\+\_\+helper.\+h}!signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+key@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+key}}
\index{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+key@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+key}!key\+\_\+helper.\+h@{key\+\_\+helper.\+h}}
\subsubsection{\texorpdfstring{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+key()}{signal\_protocol\_key\_helper\_generate\_sender\_key()}}
{\footnotesize\ttfamily int signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+key (\begin{DoxyParamCaption}\item[{\hyperlink{structsignal__buffer}{signal\+\_\+buffer} $\ast$$\ast$}]{key\+\_\+buffer,  }\item[{\hyperlink{structsignal__context}{signal\+\_\+context} $\ast$}]{global\+\_\+context }\end{DoxyParamCaption})}

\mbox{\Hypertarget{key__helper_8h_a4f5dfba3f9ddbc2320b5ebb11c27ed26}\label{key__helper_8h_a4f5dfba3f9ddbc2320b5ebb11c27ed26}} 
\index{key\+\_\+helper.\+h@{key\+\_\+helper.\+h}!signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+key\+\_\+id@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+key\+\_\+id}}
\index{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+key\+\_\+id@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+key\+\_\+id}!key\+\_\+helper.\+h@{key\+\_\+helper.\+h}}
\subsubsection{\texorpdfstring{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+key\+\_\+id()}{signal\_protocol\_key\_helper\_generate\_sender\_key\_id()}}
{\footnotesize\ttfamily int signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+key\+\_\+id (\begin{DoxyParamCaption}\item[{\hyperlink{uthash_8h_a435d1572bf3f880d55459d9805097f62}{uint32\+\_\+t} $\ast$}]{key\+\_\+id,  }\item[{\hyperlink{structsignal__context}{signal\+\_\+context} $\ast$}]{global\+\_\+context }\end{DoxyParamCaption})}

\mbox{\Hypertarget{key__helper_8h_a4e0813cdd11c7f79282f4a2c737e3ea7}\label{key__helper_8h_a4e0813cdd11c7f79282f4a2c737e3ea7}} 
\index{key\+\_\+helper.\+h@{key\+\_\+helper.\+h}!signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+signing\+\_\+key@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+signing\+\_\+key}}
\index{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+signing\+\_\+key@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+signing\+\_\+key}!key\+\_\+helper.\+h@{key\+\_\+helper.\+h}}
\subsubsection{\texorpdfstring{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+signing\+\_\+key()}{signal\_protocol\_key\_helper\_generate\_sender\_signing\_key()}}
{\footnotesize\ttfamily int signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+sender\+\_\+signing\+\_\+key (\begin{DoxyParamCaption}\item[{\hyperlink{signal__protocol__types_8h_ae66f8b39deda7e0ce46f3ee15561472a}{ec\+\_\+key\+\_\+pair} $\ast$$\ast$}]{key\+\_\+pair,  }\item[{\hyperlink{structsignal__context}{signal\+\_\+context} $\ast$}]{global\+\_\+context }\end{DoxyParamCaption})}

\mbox{\Hypertarget{key__helper_8h_a5bd3ab4ba84a14dee25fce1ebcaa1057}\label{key__helper_8h_a5bd3ab4ba84a14dee25fce1ebcaa1057}} 
\index{key\+\_\+helper.\+h@{key\+\_\+helper.\+h}!signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+signed\+\_\+pre\+\_\+key@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+signed\+\_\+pre\+\_\+key}}
\index{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+signed\+\_\+pre\+\_\+key@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+signed\+\_\+pre\+\_\+key}!key\+\_\+helper.\+h@{key\+\_\+helper.\+h}}
\subsubsection{\texorpdfstring{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+signed\+\_\+pre\+\_\+key()}{signal\_protocol\_key\_helper\_generate\_signed\_pre\_key()}}
{\footnotesize\ttfamily int signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+generate\+\_\+signed\+\_\+pre\+\_\+key (\begin{DoxyParamCaption}\item[{\hyperlink{signal__protocol__types_8h_a52e43d2d7af0b108957939886064be81}{session\+\_\+signed\+\_\+pre\+\_\+key} $\ast$$\ast$}]{signed\+\_\+pre\+\_\+key,  }\item[{const \hyperlink{signal__protocol__types_8h_a2b29fe6c645390a72526c774c35ad457}{ratchet\+\_\+identity\+\_\+key\+\_\+pair} $\ast$}]{identity\+\_\+key\+\_\+pair,  }\item[{\hyperlink{uthash_8h_a435d1572bf3f880d55459d9805097f62}{uint32\+\_\+t}}]{signed\+\_\+pre\+\_\+key\+\_\+id,  }\item[{uint64\+\_\+t}]{timestamp,  }\item[{\hyperlink{structsignal__context}{signal\+\_\+context} $\ast$}]{global\+\_\+context }\end{DoxyParamCaption})}

Generate a signed pre key


\begin{DoxyParams}{Parameters}
{\em signed\+\_\+pre\+\_\+key} & set to the generated pre key \\
\hline
{\em identity\+\_\+key\+\_\+pair} & the local client\textquotesingle{}s identity key pair. \\
\hline
{\em signed\+\_\+pre\+\_\+key\+\_\+id} & the pre key ID to assign the generated signed pre key \\
\hline
{\em timestamp} & the current time in milliseconds since the U\+N\+IX epoch\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, or negative on failure 
\end{DoxyReturn}
\mbox{\Hypertarget{key__helper_8h_a0551fb17b70cce9140865d1c893be30f}\label{key__helper_8h_a0551fb17b70cce9140865d1c893be30f}} 
\index{key\+\_\+helper.\+h@{key\+\_\+helper.\+h}!signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+get\+\_\+random\+\_\+sequence@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+get\+\_\+random\+\_\+sequence}}
\index{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+get\+\_\+random\+\_\+sequence@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+get\+\_\+random\+\_\+sequence}!key\+\_\+helper.\+h@{key\+\_\+helper.\+h}}
\subsubsection{\texorpdfstring{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+get\+\_\+random\+\_\+sequence()}{signal\_protocol\_key\_helper\_get\_random\_sequence()}}
{\footnotesize\ttfamily int signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+get\+\_\+random\+\_\+sequence (\begin{DoxyParamCaption}\item[{int $\ast$}]{value,  }\item[{int}]{max,  }\item[{\hyperlink{structsignal__context}{signal\+\_\+context} $\ast$}]{global\+\_\+context }\end{DoxyParamCaption})}

Generate a random number between 0 (inclusive) and the provided maximum (exclusive).


\begin{DoxyParams}{Parameters}
{\em value} & set to the next random number \\
\hline
{\em max} & the maximum bound on the value of the random number \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, or negative on failure 
\end{DoxyReturn}
\mbox{\Hypertarget{key__helper_8h_a8e35c52c7a3d46750b8339a978cb5785}\label{key__helper_8h_a8e35c52c7a3d46750b8339a978cb5785}} 
\index{key\+\_\+helper.\+h@{key\+\_\+helper.\+h}!signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+element@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+element}}
\index{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+element@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+element}!key\+\_\+helper.\+h@{key\+\_\+helper.\+h}}
\subsubsection{\texorpdfstring{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+element()}{signal\_protocol\_key\_helper\_key\_list\_element()}}
{\footnotesize\ttfamily \hyperlink{signal__protocol__types_8h_a91cbd5e46d509a69d7fd018d5018c889}{session\+\_\+pre\+\_\+key}$\ast$ signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+element (\begin{DoxyParamCaption}\item[{const \hyperlink{signal__protocol__types_8h_af153890f9b52723e6cc43f3dff3b2ed6}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+pre\+\_\+key\+\_\+list\+\_\+node} $\ast$}]{node }\end{DoxyParamCaption})}

Get the pre key element for the current node in the key list.


\begin{DoxyParams}{Parameters}
{\em node} & current list node \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pre key element 
\end{DoxyReturn}
\mbox{\Hypertarget{key__helper_8h_a081e73ddae96c36bcc0dcba7333ada97}\label{key__helper_8h_a081e73ddae96c36bcc0dcba7333ada97}} 
\index{key\+\_\+helper.\+h@{key\+\_\+helper.\+h}!signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+free@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+free}}
\index{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+free@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+free}!key\+\_\+helper.\+h@{key\+\_\+helper.\+h}}
\subsubsection{\texorpdfstring{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+free()}{signal\_protocol\_key\_helper\_key\_list\_free()}}
{\footnotesize\ttfamily void signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+free (\begin{DoxyParamCaption}\item[{\hyperlink{signal__protocol__types_8h_af153890f9b52723e6cc43f3dff3b2ed6}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+pre\+\_\+key\+\_\+list\+\_\+node} $\ast$}]{head }\end{DoxyParamCaption})}

Free the key list.


\begin{DoxyParams}{Parameters}
{\em head} & pointer to the head of the list to free \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{key__helper_8h_aedcb11009fb2be958e70b8d42ff82496}\label{key__helper_8h_aedcb11009fb2be958e70b8d42ff82496}} 
\index{key\+\_\+helper.\+h@{key\+\_\+helper.\+h}!signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+next@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+next}}
\index{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+next@{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+next}!key\+\_\+helper.\+h@{key\+\_\+helper.\+h}}
\subsubsection{\texorpdfstring{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+next()}{signal\_protocol\_key\_helper\_key\_list\_next()}}
{\footnotesize\ttfamily \hyperlink{signal__protocol__types_8h_af153890f9b52723e6cc43f3dff3b2ed6}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+pre\+\_\+key\+\_\+list\+\_\+node}$\ast$ signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+key\+\_\+list\+\_\+next (\begin{DoxyParamCaption}\item[{const \hyperlink{signal__protocol__types_8h_af153890f9b52723e6cc43f3dff3b2ed6}{signal\+\_\+protocol\+\_\+key\+\_\+helper\+\_\+pre\+\_\+key\+\_\+list\+\_\+node} $\ast$}]{node }\end{DoxyParamCaption})}

Get the next element in the key list.


\begin{DoxyParams}{Parameters}
{\em node} & current list node \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
next list node, or 0 if at the end of the list 
\end{DoxyReturn}
