\hypertarget{group__wickr__protocol}{}\doxysection{Wickr Protocol}
\label{group__wickr__protocol}\index{Wickr Protocol@{Wickr Protocol}}
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structwickr__packet}{wickr\+\_\+packet}}
\begin{DoxyCompactList}\small\item\em An encrypted packet made with the Wickr protocol. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structwickr__parse__result}{wickr\+\_\+parse\+\_\+result}}
\begin{DoxyCompactList}\small\item\em result from parsing an inbound packet \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structwickr__decode__result}{wickr\+\_\+decode\+\_\+result}}
\begin{DoxyCompactList}\small\item\em a packet decoding result \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{group__wickr__protocol_gad269883d0b8b26c4fa52da595ef5ddf7}{OLDEST\+\_\+\+PACKET\+\_\+\+VERSION}}~2
\item 
\#define \mbox{\hyperlink{group__wickr__protocol_ga89ff9f93c5494db53d3ff27353989862}{CURRENT\+\_\+\+PACKET\+\_\+\+VERSION}}~4
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{structwickr__key__exchange}{wickr\+\_\+key\+\_\+exchange\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__protocol_gac21e7b7fda1612923d83e7e75166209c}{wickr\+\_\+key\+\_\+exchange\+\_\+create\+\_\+with\+\_\+packet\+\_\+key}} (const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$engine, const \mbox{\hyperlink{structwickr__identity__chain}{wickr\+\_\+identity\+\_\+chain\+\_\+t}} $\ast$sender, const \mbox{\hyperlink{structwickr__node}{wickr\+\_\+node\+\_\+t}} $\ast$receiver, \mbox{\hyperlink{structwickr__ec__key}{wickr\+\_\+ec\+\_\+key\+\_\+t}} $\ast$packet\+\_\+exchange\+\_\+key, const \mbox{\hyperlink{structwickr__cipher__key}{wickr\+\_\+cipher\+\_\+key\+\_\+t}} $\ast$packet\+\_\+key, const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$psk, uint8\+\_\+t version)
\item 
\mbox{\hyperlink{structwickr__key__exchange}{wickr\+\_\+key\+\_\+exchange\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__protocol_ga2b967bbdd161d8e37d19c4ab9621771b}{wickr\+\_\+key\+\_\+exchange\+\_\+create\+\_\+with\+\_\+data}} (const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$engine, const \mbox{\hyperlink{structwickr__identity__chain}{wickr\+\_\+identity\+\_\+chain\+\_\+t}} $\ast$sender, const \mbox{\hyperlink{structwickr__node}{wickr\+\_\+node\+\_\+t}} $\ast$receiver, \mbox{\hyperlink{structwickr__ec__key}{wickr\+\_\+ec\+\_\+key\+\_\+t}} $\ast$packet\+\_\+exchange\+\_\+key, const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$data\+\_\+to\+\_\+wrap, \mbox{\hyperlink{structwickr__cipher}{wickr\+\_\+cipher\+\_\+t}} exchange\+\_\+cipher, const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$psk, uint8\+\_\+t version)
\item 
\mbox{\hyperlink{structwickr__packet}{wickr\+\_\+packet\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__protocol_gac952913ddaf848d2def181cd55b30883}{wickr\+\_\+packet\+\_\+create}} (uint8\+\_\+t version, \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$content, \mbox{\hyperlink{structwickr__ecdsa__result}{wickr\+\_\+ecdsa\+\_\+result\+\_\+t}} $\ast$signature)
\item 
\mbox{\hyperlink{structwickr__packet}{wickr\+\_\+packet\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__protocol_ga3427a40815c9f65a78516405d1b88072}{wickr\+\_\+packet\+\_\+create\+\_\+from\+\_\+buffer}} (const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$buffer)
\item 
\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__protocol_gaa983fe863635b69d69d6d86d01443ecf}{wickr\+\_\+packet\+\_\+serialize}} (const \mbox{\hyperlink{structwickr__packet}{wickr\+\_\+packet\+\_\+t}} $\ast$packet)
\item 
\mbox{\hyperlink{structwickr__packet}{wickr\+\_\+packet\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__protocol_ga0c95ad86819bacf98c11115d748039db}{wickr\+\_\+packet\+\_\+copy}} (const \mbox{\hyperlink{structwickr__packet}{wickr\+\_\+packet\+\_\+t}} $\ast$source)
\item 
void \mbox{\hyperlink{group__wickr__protocol_gab15d7556ad2806aa823ec2d3e3bf5a46}{wickr\+\_\+packet\+\_\+destroy}} (\mbox{\hyperlink{structwickr__packet}{wickr\+\_\+packet\+\_\+t}} $\ast$$\ast$packet)
\item 
\mbox{\hyperlink{structwickr__parse__result}{wickr\+\_\+parse\+\_\+result\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__protocol_gac2673bcfeae2f8d693e523809bb6bb30}{wickr\+\_\+parse\+\_\+result\+\_\+create\+\_\+failure}} (wickr\+\_\+packet\+\_\+signature\+\_\+status signature\+\_\+status, wickr\+\_\+decode\+\_\+error error)
\item 
\mbox{\hyperlink{structwickr__parse__result}{wickr\+\_\+parse\+\_\+result\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__protocol_ga7bd98225a92620e1aa5940cf59fdbedf}{wickr\+\_\+parse\+\_\+result\+\_\+create\+\_\+success}} (\mbox{\hyperlink{structwickr__key__exchange__set}{wickr\+\_\+key\+\_\+exchange\+\_\+set\+\_\+t}} $\ast$key\+\_\+exchange\+\_\+set, \mbox{\hyperlink{structwickr__key__exchange}{wickr\+\_\+key\+\_\+exchange\+\_\+t}} $\ast$key\+\_\+exchange, \mbox{\hyperlink{structwickr__cipher__result}{wickr\+\_\+cipher\+\_\+result\+\_\+t}} $\ast$enc\+\_\+payload)
\item 
\mbox{\hyperlink{structwickr__parse__result}{wickr\+\_\+parse\+\_\+result\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__protocol_ga1671066ddc19b38ed05d4460d5a96706}{wickr\+\_\+parse\+\_\+result\+\_\+copy}} (const \mbox{\hyperlink{structwickr__parse__result}{wickr\+\_\+parse\+\_\+result\+\_\+t}} $\ast$source)
\item 
void \mbox{\hyperlink{group__wickr__protocol_ga706d39419c8991f417f37f556cee8df9}{wickr\+\_\+parse\+\_\+result\+\_\+destroy}} (\mbox{\hyperlink{structwickr__parse__result}{wickr\+\_\+parse\+\_\+result\+\_\+t}} $\ast$$\ast$result)
\item 
\mbox{\hyperlink{structwickr__decode__result}{wickr\+\_\+decode\+\_\+result\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__protocol_ga2bd6f49ed993d2290aaafa514eba43ed}{wickr\+\_\+decode\+\_\+result\+\_\+create\+\_\+failure}} (wickr\+\_\+decode\+\_\+error decode\+\_\+error)
\item 
\mbox{\hyperlink{structwickr__decode__result}{wickr\+\_\+decode\+\_\+result\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__protocol_ga633aaf4cb6159be0110401f06dae458c}{wickr\+\_\+decode\+\_\+result\+\_\+create\+\_\+success}} (\mbox{\hyperlink{structwickr__payload}{wickr\+\_\+payload\+\_\+t}} $\ast$decrypted\+\_\+payload, \mbox{\hyperlink{structwickr__cipher__key}{wickr\+\_\+cipher\+\_\+key\+\_\+t}} $\ast$payload\+\_\+key)
\item 
\mbox{\hyperlink{structwickr__decode__result}{wickr\+\_\+decode\+\_\+result\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__protocol_ga36183bf96372661f890aefbe388bd32a}{wickr\+\_\+decode\+\_\+result\+\_\+copy}} (const \mbox{\hyperlink{structwickr__decode__result}{wickr\+\_\+decode\+\_\+result\+\_\+t}} $\ast$result)
\item 
void \mbox{\hyperlink{group__wickr__protocol_ga94154ab44a6c2e9b97a115e37416efe1}{wickr\+\_\+decode\+\_\+result\+\_\+destroy}} (\mbox{\hyperlink{structwickr__decode__result}{wickr\+\_\+decode\+\_\+result\+\_\+t}} $\ast$$\ast$result)
\item 
\mbox{\hyperlink{structwickr__packet}{wickr\+\_\+packet\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__protocol_gaf34d8082df52a7ade2fea54eea65d342}{wickr\+\_\+packet\+\_\+create\+\_\+from\+\_\+components}} (const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$engine, const \mbox{\hyperlink{structwickr__cipher__key}{wickr\+\_\+cipher\+\_\+key\+\_\+t}} $\ast$header\+\_\+key, const \mbox{\hyperlink{structwickr__cipher__key}{wickr\+\_\+cipher\+\_\+key\+\_\+t}} $\ast$payload\+\_\+key, \mbox{\hyperlink{structwickr__ec__key}{wickr\+\_\+ec\+\_\+key\+\_\+t}} $\ast$exchange\+\_\+key, const \mbox{\hyperlink{structwickr__payload}{wickr\+\_\+payload\+\_\+t}} $\ast$payload, const wickr\+\_\+node\+\_\+array\+\_\+t $\ast$recipients, const \mbox{\hyperlink{structwickr__identity__chain}{wickr\+\_\+identity\+\_\+chain\+\_\+t}} $\ast$sender\+\_\+signing\+\_\+identity, uint8\+\_\+t version)
\item 
\mbox{\hyperlink{structwickr__parse__result}{wickr\+\_\+parse\+\_\+result\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__protocol_ga1654ef299f9189b27e5e58485f1ffcf5}{wickr\+\_\+parse\+\_\+result\+\_\+from\+\_\+packet}} (const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$engine, const \mbox{\hyperlink{structwickr__packet}{wickr\+\_\+packet\+\_\+t}} $\ast$packet, const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$receiver\+\_\+node\+\_\+id, wickr\+\_\+header\+\_\+keygen\+\_\+func header\+\_\+keygen\+\_\+func, const \mbox{\hyperlink{structwickr__identity__chain}{wickr\+\_\+identity\+\_\+chain\+\_\+t}} $\ast$sender\+\_\+signing\+\_\+identity)
\item 
\mbox{\hyperlink{structwickr__decode__result}{wickr\+\_\+decode\+\_\+result\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__protocol_ga32d9da2e10d1d653b2ac894d50aaedb0}{wickr\+\_\+decode\+\_\+result\+\_\+from\+\_\+parse\+\_\+result}} (const \mbox{\hyperlink{structwickr__packet}{wickr\+\_\+packet\+\_\+t}} $\ast$packet, const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$engine, const \mbox{\hyperlink{structwickr__parse__result}{wickr\+\_\+parse\+\_\+result\+\_\+t}} $\ast$parse\+\_\+result, \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$receiver\+\_\+dev\+\_\+id, \mbox{\hyperlink{structwickr__ec__key}{wickr\+\_\+ec\+\_\+key\+\_\+t}} $\ast$receiver\+\_\+decode\+\_\+key, \mbox{\hyperlink{structwickr__identity__chain}{wickr\+\_\+identity\+\_\+chain\+\_\+t}} $\ast$receiver\+\_\+signing\+\_\+identity, const \mbox{\hyperlink{structwickr__identity__chain}{wickr\+\_\+identity\+\_\+chain\+\_\+t}} $\ast$sender\+\_\+signing\+\_\+identity)
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}


\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{group__wickr__protocol_ga89ff9f93c5494db53d3ff27353989862}\label{group__wickr__protocol_ga89ff9f93c5494db53d3ff27353989862}} 
\index{Wickr Protocol@{Wickr Protocol}!CURRENT\_PACKET\_VERSION@{CURRENT\_PACKET\_VERSION}}
\index{CURRENT\_PACKET\_VERSION@{CURRENT\_PACKET\_VERSION}!Wickr Protocol@{Wickr Protocol}}
\doxysubsubsection{\texorpdfstring{CURRENT\_PACKET\_VERSION}{CURRENT\_PACKET\_VERSION}}
{\footnotesize\ttfamily \#define CURRENT\+\_\+\+PACKET\+\_\+\+VERSION~4}

The most recent version of the protocol is version 4 \mbox{\Hypertarget{group__wickr__protocol_gad269883d0b8b26c4fa52da595ef5ddf7}\label{group__wickr__protocol_gad269883d0b8b26c4fa52da595ef5ddf7}} 
\index{Wickr Protocol@{Wickr Protocol}!OLDEST\_PACKET\_VERSION@{OLDEST\_PACKET\_VERSION}}
\index{OLDEST\_PACKET\_VERSION@{OLDEST\_PACKET\_VERSION}!Wickr Protocol@{Wickr Protocol}}
\doxysubsubsection{\texorpdfstring{OLDEST\_PACKET\_VERSION}{OLDEST\_PACKET\_VERSION}}
{\footnotesize\ttfamily \#define OLDEST\+\_\+\+PACKET\+\_\+\+VERSION~2}

The oldest packet version supported is version 2 

\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__wickr__protocol_ga36183bf96372661f890aefbe388bd32a}\label{group__wickr__protocol_ga36183bf96372661f890aefbe388bd32a}} 
\index{Wickr Protocol@{Wickr Protocol}!wickr\_decode\_result\_copy@{wickr\_decode\_result\_copy}}
\index{wickr\_decode\_result\_copy@{wickr\_decode\_result\_copy}!Wickr Protocol@{Wickr Protocol}}
\doxysubsubsection{\texorpdfstring{wickr\_decode\_result\_copy()}{wickr\_decode\_result\_copy()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__decode__result}{wickr\+\_\+decode\+\_\+result\+\_\+t}}$\ast$ wickr\+\_\+decode\+\_\+result\+\_\+copy (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__decode__result}{wickr\+\_\+decode\+\_\+result\+\_\+t}} $\ast$}]{result }\end{DoxyParamCaption})}

Copy a decode result


\begin{DoxyParams}{Parameters}
{\em result} & the decode result to copy \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated decode result holding a deep copy of the properties of \textquotesingle{}source\textquotesingle{} 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__protocol_ga2bd6f49ed993d2290aaafa514eba43ed}\label{group__wickr__protocol_ga2bd6f49ed993d2290aaafa514eba43ed}} 
\index{Wickr Protocol@{Wickr Protocol}!wickr\_decode\_result\_create\_failure@{wickr\_decode\_result\_create\_failure}}
\index{wickr\_decode\_result\_create\_failure@{wickr\_decode\_result\_create\_failure}!Wickr Protocol@{Wickr Protocol}}
\doxysubsubsection{\texorpdfstring{wickr\_decode\_result\_create\_failure()}{wickr\_decode\_result\_create\_failure()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__decode__result}{wickr\+\_\+decode\+\_\+result\+\_\+t}}$\ast$ wickr\+\_\+decode\+\_\+result\+\_\+create\+\_\+failure (\begin{DoxyParamCaption}\item[{wickr\+\_\+decode\+\_\+error}]{decode\+\_\+error }\end{DoxyParamCaption})}

Create a negative decode result


\begin{DoxyParams}{Parameters}
{\em decode\+\_\+error} & the error found during decoding \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated decode result with error \textquotesingle{}decode\+\_\+error\textquotesingle{} and NULL for other properties 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__protocol_ga633aaf4cb6159be0110401f06dae458c}\label{group__wickr__protocol_ga633aaf4cb6159be0110401f06dae458c}} 
\index{Wickr Protocol@{Wickr Protocol}!wickr\_decode\_result\_create\_success@{wickr\_decode\_result\_create\_success}}
\index{wickr\_decode\_result\_create\_success@{wickr\_decode\_result\_create\_success}!Wickr Protocol@{Wickr Protocol}}
\doxysubsubsection{\texorpdfstring{wickr\_decode\_result\_create\_success()}{wickr\_decode\_result\_create\_success()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__decode__result}{wickr\+\_\+decode\+\_\+result\+\_\+t}}$\ast$ wickr\+\_\+decode\+\_\+result\+\_\+create\+\_\+success (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structwickr__payload}{wickr\+\_\+payload\+\_\+t}} $\ast$}]{decrypted\+\_\+payload,  }\item[{\mbox{\hyperlink{structwickr__cipher__key}{wickr\+\_\+cipher\+\_\+key\+\_\+t}} $\ast$}]{payload\+\_\+key }\end{DoxyParamCaption})}

Create a positive decode result


\begin{DoxyParams}{Parameters}
{\em decrypted\+\_\+payload} & the decrypted payload found during decoding \\
\hline
{\em payload\+\_\+key} & the payload key derived during decoding \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated decode result with no error 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__protocol_ga94154ab44a6c2e9b97a115e37416efe1}\label{group__wickr__protocol_ga94154ab44a6c2e9b97a115e37416efe1}} 
\index{Wickr Protocol@{Wickr Protocol}!wickr\_decode\_result\_destroy@{wickr\_decode\_result\_destroy}}
\index{wickr\_decode\_result\_destroy@{wickr\_decode\_result\_destroy}!Wickr Protocol@{Wickr Protocol}}
\doxysubsubsection{\texorpdfstring{wickr\_decode\_result\_destroy()}{wickr\_decode\_result\_destroy()}}
{\footnotesize\ttfamily void wickr\+\_\+decode\+\_\+result\+\_\+destroy (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structwickr__decode__result}{wickr\+\_\+decode\+\_\+result\+\_\+t}} $\ast$$\ast$}]{result }\end{DoxyParamCaption})}

Destroy a decode result


\begin{DoxyParams}{Parameters}
{\em result} & a pointer to the decode result to destroy. All properties of \textquotesingle{}$\ast$result\textquotesingle{} will also be destroyed \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__wickr__protocol_ga32d9da2e10d1d653b2ac894d50aaedb0}\label{group__wickr__protocol_ga32d9da2e10d1d653b2ac894d50aaedb0}} 
\index{Wickr Protocol@{Wickr Protocol}!wickr\_decode\_result\_from\_parse\_result@{wickr\_decode\_result\_from\_parse\_result}}
\index{wickr\_decode\_result\_from\_parse\_result@{wickr\_decode\_result\_from\_parse\_result}!Wickr Protocol@{Wickr Protocol}}
\doxysubsubsection{\texorpdfstring{wickr\_decode\_result\_from\_parse\_result()}{wickr\_decode\_result\_from\_parse\_result()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__decode__result}{wickr\+\_\+decode\+\_\+result\+\_\+t}}$\ast$ wickr\+\_\+decode\+\_\+result\+\_\+from\+\_\+parse\+\_\+result (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__packet}{wickr\+\_\+packet\+\_\+t}} $\ast$}]{packet,  }\item[{const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$}]{engine,  }\item[{const \mbox{\hyperlink{structwickr__parse__result}{wickr\+\_\+parse\+\_\+result\+\_\+t}} $\ast$}]{parse\+\_\+result,  }\item[{\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{receiver\+\_\+dev\+\_\+id,  }\item[{\mbox{\hyperlink{structwickr__ec__key}{wickr\+\_\+ec\+\_\+key\+\_\+t}} $\ast$}]{receiver\+\_\+decode\+\_\+key,  }\item[{\mbox{\hyperlink{structwickr__identity__chain}{wickr\+\_\+identity\+\_\+chain\+\_\+t}} $\ast$}]{receiver\+\_\+signing\+\_\+identity,  }\item[{const \mbox{\hyperlink{structwickr__identity__chain}{wickr\+\_\+identity\+\_\+chain\+\_\+t}} $\ast$}]{sender\+\_\+signing\+\_\+identity }\end{DoxyParamCaption})}

Decode a parsed packet payload using a fetched ephemeral decode\+\_\+key

For more information see Wickr white paper (Receiving a Message 6-\/9)

NOTE\+: This is a low level function that should not be called directly from this API if it can be avoided. Please use the \textquotesingle{}\mbox{\hyperlink{structwickr__ctx}{wickr\+\_\+ctx}}\textquotesingle{} API instead since it is a higher level and safer set of functions


\begin{DoxyParams}{Parameters}
{\em packet} & the packet to decode \\
\hline
{\em engine} & a crypto engine \\
\hline
{\em parse\+\_\+result} & a previously generated parse result from \textquotesingle{}packet\textquotesingle{} \\
\hline
{\em receiver\+\_\+dev\+\_\+id} & the \textquotesingle{}msg\+\_\+proto\+\_\+id\textquotesingle{} of \textquotesingle{}\mbox{\hyperlink{structwickr__dev__info}{wickr\+\_\+dev\+\_\+info}}\textquotesingle{} of the recipient \\
\hline
{\em receiver\+\_\+decode\+\_\+key} & the key to attempt to complete the key exchange for discovered in the parse phase, so that the payload can be decoded \\
\hline
{\em receiver\+\_\+signing\+\_\+identity} & the recipient of the packet \\
\hline
{\em sender\+\_\+signing\+\_\+identity} & the sender of the packet used \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a decode result containing decrypted packet information if decode succeeded 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__protocol_ga2b967bbdd161d8e37d19c4ab9621771b}\label{group__wickr__protocol_ga2b967bbdd161d8e37d19c4ab9621771b}} 
\index{Wickr Protocol@{Wickr Protocol}!wickr\_key\_exchange\_create\_with\_data@{wickr\_key\_exchange\_create\_with\_data}}
\index{wickr\_key\_exchange\_create\_with\_data@{wickr\_key\_exchange\_create\_with\_data}!Wickr Protocol@{Wickr Protocol}}
\doxysubsubsection{\texorpdfstring{wickr\_key\_exchange\_create\_with\_data()}{wickr\_key\_exchange\_create\_with\_data()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__key__exchange}{wickr\+\_\+key\+\_\+exchange\+\_\+t}}$\ast$ wickr\+\_\+key\+\_\+exchange\+\_\+create\+\_\+with\+\_\+data (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$}]{engine,  }\item[{const \mbox{\hyperlink{structwickr__identity__chain}{wickr\+\_\+identity\+\_\+chain\+\_\+t}} $\ast$}]{sender,  }\item[{const \mbox{\hyperlink{structwickr__node}{wickr\+\_\+node\+\_\+t}} $\ast$}]{receiver,  }\item[{\mbox{\hyperlink{structwickr__ec__key}{wickr\+\_\+ec\+\_\+key\+\_\+t}} $\ast$}]{packet\+\_\+exchange\+\_\+key,  }\item[{const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{data\+\_\+to\+\_\+wrap,  }\item[{\mbox{\hyperlink{structwickr__cipher}{wickr\+\_\+cipher\+\_\+t}}}]{exchange\+\_\+cipher,  }\item[{const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{psk,  }\item[{uint8\+\_\+t}]{version }\end{DoxyParamCaption})}

Compute a key exchange given sender/receiver information and bytes to protect (Sender Encoding) This method at a high level creates a shared secret between a sender and receiver (ECDH), runs the shared secret through a kdf (HKDF) and then uses the resulting secret as a cipher key to encrypt bytes of data. \textquotesingle{}wickr\+\_\+key\+\_\+exchange\+\_\+create\+\_\+with\+\_\+packet\+\_\+key\textquotesingle{} also exists as a version of this function to specifically wrap cipher\+\_\+keys instead of raw data

See Wickr white paper \textquotesingle{}Prepare Key Exchange Data\textquotesingle{} for more information

NOTE\+: This is a low level function that should not be called directly from this API if it can be avoided. Please use the \textquotesingle{}\mbox{\hyperlink{structwickr__ctx}{wickr\+\_\+ctx}}\textquotesingle{} API instead since it is a higher level and safer set of functions


\begin{DoxyParams}{Parameters}
{\em engine} & a crypto engine supporting ECDH key exchanges \\
\hline
{\em sender} & the identity chain of the sender \\
\hline
{\em receiver} & the node this key exchange is destined for \\
\hline
{\em packet\+\_\+exchange\+\_\+key} & an EC key to use for the sender side of the ECDH function, the private component of this key is no longer needed after this function is called. The public component of it will get forwarded in the message key exchange set to the receiver \\
\hline
{\em data\+\_\+to\+\_\+wrap} & This is the data we are protecting by the output of the key exchange \\
\hline
{\em exchange\+\_\+cipher} & the cipher that the exchange should use protect \textquotesingle{}data\+\_\+to\+\_\+wrap\textquotesingle{} with \\
\hline
{\em psk} & optional pre-\/shared key data to put into the \textquotesingle{}salt\textquotesingle{} field of HKDF \\
\hline
{\em version} & the version of the packet being generated \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated key exchange object holding public metadata about this exchange and the computed exchange data 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__protocol_gac21e7b7fda1612923d83e7e75166209c}\label{group__wickr__protocol_gac21e7b7fda1612923d83e7e75166209c}} 
\index{Wickr Protocol@{Wickr Protocol}!wickr\_key\_exchange\_create\_with\_packet\_key@{wickr\_key\_exchange\_create\_with\_packet\_key}}
\index{wickr\_key\_exchange\_create\_with\_packet\_key@{wickr\_key\_exchange\_create\_with\_packet\_key}!Wickr Protocol@{Wickr Protocol}}
\doxysubsubsection{\texorpdfstring{wickr\_key\_exchange\_create\_with\_packet\_key()}{wickr\_key\_exchange\_create\_with\_packet\_key()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__key__exchange}{wickr\+\_\+key\+\_\+exchange\+\_\+t}}$\ast$ wickr\+\_\+key\+\_\+exchange\+\_\+create\+\_\+with\+\_\+packet\+\_\+key (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$}]{engine,  }\item[{const \mbox{\hyperlink{structwickr__identity__chain}{wickr\+\_\+identity\+\_\+chain\+\_\+t}} $\ast$}]{sender,  }\item[{const \mbox{\hyperlink{structwickr__node}{wickr\+\_\+node\+\_\+t}} $\ast$}]{receiver,  }\item[{\mbox{\hyperlink{structwickr__ec__key}{wickr\+\_\+ec\+\_\+key\+\_\+t}} $\ast$}]{packet\+\_\+exchange\+\_\+key,  }\item[{const \mbox{\hyperlink{structwickr__cipher__key}{wickr\+\_\+cipher\+\_\+key\+\_\+t}} $\ast$}]{packet\+\_\+key,  }\item[{const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{psk,  }\item[{uint8\+\_\+t}]{version }\end{DoxyParamCaption})}

Compute a key exchange given sender/receiver information and a packet key to protect (Sender Encoding) Thie function is a convience function around \textquotesingle{}wickr\+\_\+key\+\_\+exchange\+\_\+create\+\_\+with\+\_\+data\textquotesingle{} that determines exchange\+\_\+cipher automaticallly based on \textquotesingle{}packet\+\_\+key\textquotesingle{} cipher and also takes care of serializing \textquotesingle{}packet\+\_\+key\textquotesingle{}

See Wickr white paper \textquotesingle{}Prepare Key Exchange Data\textquotesingle{} for more information

NOTE\+: This is a low level function that should not be called directly from this API if it can be avoided. Please use the \textquotesingle{}\mbox{\hyperlink{structwickr__ctx}{wickr\+\_\+ctx}}\textquotesingle{} API instead since it is a higher level and safer set of functions


\begin{DoxyParams}{Parameters}
{\em engine} & a crypto engine supporting ECDH key exchanges \\
\hline
{\em sender} & the identity chain of the sender \\
\hline
{\em receiver} & the node this key exchange is destined for \\
\hline
{\em packet\+\_\+exchange\+\_\+key} & an EC key to use for the sender side of the ECDH function, the private component of this key is no longer needed after this function is called. The public component of it will get forwarded in the message key exchange set to the receiver \\
\hline
{\em packet\+\_\+key} & the cipher key to use for encrypting the payload of the message that is being created. This is the data we are protecting \\
\hline
{\em psk} & optional pre-\/shared key data to put into the \textquotesingle{}salt\textquotesingle{} field of HKDF \\
\hline
{\em version} & the version of the packet being generated \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated key exchange object holding public metadata about this exchange and the computed exchange data 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__protocol_ga0c95ad86819bacf98c11115d748039db}\label{group__wickr__protocol_ga0c95ad86819bacf98c11115d748039db}} 
\index{Wickr Protocol@{Wickr Protocol}!wickr\_packet\_copy@{wickr\_packet\_copy}}
\index{wickr\_packet\_copy@{wickr\_packet\_copy}!Wickr Protocol@{Wickr Protocol}}
\doxysubsubsection{\texorpdfstring{wickr\_packet\_copy()}{wickr\_packet\_copy()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__packet}{wickr\+\_\+packet\+\_\+t}}$\ast$ wickr\+\_\+packet\+\_\+copy (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__packet}{wickr\+\_\+packet\+\_\+t}} $\ast$}]{source }\end{DoxyParamCaption})}

Copy a packet


\begin{DoxyParams}{Parameters}
{\em source} & the packet to copy \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated packet holding a deep copy of the properties of \textquotesingle{}source\textquotesingle{} 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__protocol_gac952913ddaf848d2def181cd55b30883}\label{group__wickr__protocol_gac952913ddaf848d2def181cd55b30883}} 
\index{Wickr Protocol@{Wickr Protocol}!wickr\_packet\_create@{wickr\_packet\_create}}
\index{wickr\_packet\_create@{wickr\_packet\_create}!Wickr Protocol@{Wickr Protocol}}
\doxysubsubsection{\texorpdfstring{wickr\_packet\_create()}{wickr\_packet\_create()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__packet}{wickr\+\_\+packet\+\_\+t}}$\ast$ wickr\+\_\+packet\+\_\+create (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{version,  }\item[{\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{content,  }\item[{\mbox{\hyperlink{structwickr__ecdsa__result}{wickr\+\_\+ecdsa\+\_\+result\+\_\+t}} $\ast$}]{signature }\end{DoxyParamCaption})}

Create a packet from components


\begin{DoxyParams}{Parameters}
{\em version} & see \textquotesingle{}wickr\+\_\+protocol\textquotesingle{} property documentation property documentation \\
\hline
{\em content} & see \textquotesingle{}wickr\+\_\+protocol\textquotesingle{} property documentation property documentation \\
\hline
{\em signature} & see \textquotesingle{}wickr\+\_\+protocol\textquotesingle{} property documentation property documentation \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated packet owning the properties passed in 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__protocol_ga3427a40815c9f65a78516405d1b88072}\label{group__wickr__protocol_ga3427a40815c9f65a78516405d1b88072}} 
\index{Wickr Protocol@{Wickr Protocol}!wickr\_packet\_create\_from\_buffer@{wickr\_packet\_create\_from\_buffer}}
\index{wickr\_packet\_create\_from\_buffer@{wickr\_packet\_create\_from\_buffer}!Wickr Protocol@{Wickr Protocol}}
\doxysubsubsection{\texorpdfstring{wickr\_packet\_create\_from\_buffer()}{wickr\_packet\_create\_from\_buffer()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__packet}{wickr\+\_\+packet\+\_\+t}}$\ast$ wickr\+\_\+packet\+\_\+create\+\_\+from\+\_\+buffer (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{buffer }\end{DoxyParamCaption})}

Parse a packet from a buffer generated by \textquotesingle{}wickr\+\_\+packet\+\_\+serialize\textquotesingle{}


\begin{DoxyParams}{Parameters}
{\em buffer} & a buffer output from \textquotesingle{}wickr\+\_\+packet\+\_\+serialize\textquotesingle{} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated packet using parsed data from \textquotesingle{}buffer\textquotesingle{} or NULL if parsing fails 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__protocol_gaf34d8082df52a7ade2fea54eea65d342}\label{group__wickr__protocol_gaf34d8082df52a7ade2fea54eea65d342}} 
\index{Wickr Protocol@{Wickr Protocol}!wickr\_packet\_create\_from\_components@{wickr\_packet\_create\_from\_components}}
\index{wickr\_packet\_create\_from\_components@{wickr\_packet\_create\_from\_components}!Wickr Protocol@{Wickr Protocol}}
\doxysubsubsection{\texorpdfstring{wickr\_packet\_create\_from\_components()}{wickr\_packet\_create\_from\_components()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__packet}{wickr\+\_\+packet\+\_\+t}}$\ast$ wickr\+\_\+packet\+\_\+create\+\_\+from\+\_\+components (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$}]{engine,  }\item[{const \mbox{\hyperlink{structwickr__cipher__key}{wickr\+\_\+cipher\+\_\+key\+\_\+t}} $\ast$}]{header\+\_\+key,  }\item[{const \mbox{\hyperlink{structwickr__cipher__key}{wickr\+\_\+cipher\+\_\+key\+\_\+t}} $\ast$}]{payload\+\_\+key,  }\item[{\mbox{\hyperlink{structwickr__ec__key}{wickr\+\_\+ec\+\_\+key\+\_\+t}} $\ast$}]{exchange\+\_\+key,  }\item[{const \mbox{\hyperlink{structwickr__payload}{wickr\+\_\+payload\+\_\+t}} $\ast$}]{payload,  }\item[{const wickr\+\_\+node\+\_\+array\+\_\+t $\ast$}]{recipients,  }\item[{const \mbox{\hyperlink{structwickr__identity__chain}{wickr\+\_\+identity\+\_\+chain\+\_\+t}} $\ast$}]{sender\+\_\+signing\+\_\+identity,  }\item[{uint8\+\_\+t}]{version }\end{DoxyParamCaption})}

Generate a packet given components

For more information see Wickr white paper (Sending a Message)

NOTE\+: This is a low level function that should not be called directly from this API if it can be avoided. Please use the \textquotesingle{}\mbox{\hyperlink{structwickr__ctx}{wickr\+\_\+ctx}}\textquotesingle{} API instead since it is a higher level and safer set of functions


\begin{DoxyParams}{Parameters}
{\em engine} & a crypto engine capable of ECDH and signing operations using exchange\+\_\+key, and cipher operations using payload\+\_\+key \\
\hline
{\em header\+\_\+key} & the key to encrypt the key exchange set of the message with \\
\hline
{\em payload\+\_\+key} & the key to encrypt the payload of the message with \\
\hline
{\em exchange\+\_\+key} & the key to use as the local key exchange keypair, the public side of this key will wind up in the resulting packet key exchange set \\
\hline
{\em payload} & the plaintext payload to encrypt and bundle into the packet \\
\hline
{\em recipients} & the array of nodes that the \\
\hline
{\em sender\+\_\+signing\+\_\+identity} & the identity chain belonging to the creator of the packet \\
\hline
{\em version} & the version of the protocol encoding to use for this packet \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a \textquotesingle{}sender\+\_\+signing\+\_\+identity\textquotesingle{} signed packet containing encrypted payload \textquotesingle{}payload, and key exchange set for \textquotesingle{}recipients\textquotesingle{} 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__protocol_gab15d7556ad2806aa823ec2d3e3bf5a46}\label{group__wickr__protocol_gab15d7556ad2806aa823ec2d3e3bf5a46}} 
\index{Wickr Protocol@{Wickr Protocol}!wickr\_packet\_destroy@{wickr\_packet\_destroy}}
\index{wickr\_packet\_destroy@{wickr\_packet\_destroy}!Wickr Protocol@{Wickr Protocol}}
\doxysubsubsection{\texorpdfstring{wickr\_packet\_destroy()}{wickr\_packet\_destroy()}}
{\footnotesize\ttfamily void wickr\+\_\+packet\+\_\+destroy (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structwickr__packet}{wickr\+\_\+packet\+\_\+t}} $\ast$$\ast$}]{packet }\end{DoxyParamCaption})}

Destroy a packet


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

Serialize a packet to a buffer


\begin{DoxyParams}{Parameters}
{\em packet} & the packet to serialize \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a buffer representing the packet in the following format\+: $\vert$ VERSION (4BITS) SIGNATURE\+\_\+\+CURVE\+\_\+\+ID (4BITS) $\vert$ CONTENT $\vert$ SIGNATURE OF CONTENT $\vert$ 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__protocol_ga1671066ddc19b38ed05d4460d5a96706}\label{group__wickr__protocol_ga1671066ddc19b38ed05d4460d5a96706}} 
\index{Wickr Protocol@{Wickr Protocol}!wickr\_parse\_result\_copy@{wickr\_parse\_result\_copy}}
\index{wickr\_parse\_result\_copy@{wickr\_parse\_result\_copy}!Wickr Protocol@{Wickr Protocol}}
\doxysubsubsection{\texorpdfstring{wickr\_parse\_result\_copy()}{wickr\_parse\_result\_copy()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__parse__result}{wickr\+\_\+parse\+\_\+result\+\_\+t}}$\ast$ wickr\+\_\+parse\+\_\+result\+\_\+copy (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__parse__result}{wickr\+\_\+parse\+\_\+result\+\_\+t}} $\ast$}]{source }\end{DoxyParamCaption})}

Copy a parse result


\begin{DoxyParams}{Parameters}
{\em source} & the parse result to copy \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated parse result holding a deep copy of the properties of \textquotesingle{}source\textquotesingle{} 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__protocol_gac2673bcfeae2f8d693e523809bb6bb30}\label{group__wickr__protocol_gac2673bcfeae2f8d693e523809bb6bb30}} 
\index{Wickr Protocol@{Wickr Protocol}!wickr\_parse\_result\_create\_failure@{wickr\_parse\_result\_create\_failure}}
\index{wickr\_parse\_result\_create\_failure@{wickr\_parse\_result\_create\_failure}!Wickr Protocol@{Wickr Protocol}}
\doxysubsubsection{\texorpdfstring{wickr\_parse\_result\_create\_failure()}{wickr\_parse\_result\_create\_failure()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__parse__result}{wickr\+\_\+parse\+\_\+result\+\_\+t}}$\ast$ wickr\+\_\+parse\+\_\+result\+\_\+create\+\_\+failure (\begin{DoxyParamCaption}\item[{wickr\+\_\+packet\+\_\+signature\+\_\+status}]{signature\+\_\+status,  }\item[{wickr\+\_\+decode\+\_\+error}]{error }\end{DoxyParamCaption})}

Create a negative parse result due to a failure


\begin{DoxyParams}{Parameters}
{\em signature\+\_\+status} & status of packet signature validation \\
\hline
{\em error} & error message related to parsing the packet \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a parse result containing the provided status information and NULL properties 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__protocol_ga7bd98225a92620e1aa5940cf59fdbedf}\label{group__wickr__protocol_ga7bd98225a92620e1aa5940cf59fdbedf}} 
\index{Wickr Protocol@{Wickr Protocol}!wickr\_parse\_result\_create\_success@{wickr\_parse\_result\_create\_success}}
\index{wickr\_parse\_result\_create\_success@{wickr\_parse\_result\_create\_success}!Wickr Protocol@{Wickr Protocol}}
\doxysubsubsection{\texorpdfstring{wickr\_parse\_result\_create\_success()}{wickr\_parse\_result\_create\_success()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__parse__result}{wickr\+\_\+parse\+\_\+result\+\_\+t}}$\ast$ wickr\+\_\+parse\+\_\+result\+\_\+create\+\_\+success (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structwickr__key__exchange__set}{wickr\+\_\+key\+\_\+exchange\+\_\+set\+\_\+t}} $\ast$}]{key\+\_\+exchange\+\_\+set,  }\item[{\mbox{\hyperlink{structwickr__key__exchange}{wickr\+\_\+key\+\_\+exchange\+\_\+t}} $\ast$}]{key\+\_\+exchange,  }\item[{\mbox{\hyperlink{structwickr__cipher__result}{wickr\+\_\+cipher\+\_\+result\+\_\+t}} $\ast$}]{enc\+\_\+payload }\end{DoxyParamCaption})}

Create a positive parse result


\begin{DoxyParams}{Parameters}
{\em key\+\_\+exchange\+\_\+set} & the parsed public key exchange set for all recipients \\
\hline
{\em key\+\_\+exchange} & discovered key exchange for a particular requested node, or NULL if no node was specified \\
\hline
{\em enc\+\_\+payload} & the encrypted payload parsed from the message \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a parse result containing the provided information and non-\/error codes for \textquotesingle{}signature\+\_\+status\textquotesingle{} and \textquotesingle{}err\textquotesingle{} 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__protocol_ga706d39419c8991f417f37f556cee8df9}\label{group__wickr__protocol_ga706d39419c8991f417f37f556cee8df9}} 
\index{Wickr Protocol@{Wickr Protocol}!wickr\_parse\_result\_destroy@{wickr\_parse\_result\_destroy}}
\index{wickr\_parse\_result\_destroy@{wickr\_parse\_result\_destroy}!Wickr Protocol@{Wickr Protocol}}
\doxysubsubsection{\texorpdfstring{wickr\_parse\_result\_destroy()}{wickr\_parse\_result\_destroy()}}
{\footnotesize\ttfamily void wickr\+\_\+parse\+\_\+result\+\_\+destroy (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structwickr__parse__result}{wickr\+\_\+parse\+\_\+result\+\_\+t}} $\ast$$\ast$}]{result }\end{DoxyParamCaption})}

Destroy a parse result


\begin{DoxyParams}{Parameters}
{\em result} & a pointer to the parse result to destroy. All properties of \textquotesingle{}$\ast$result\textquotesingle{} will also be destroyed \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__wickr__protocol_ga1654ef299f9189b27e5e58485f1ffcf5}\label{group__wickr__protocol_ga1654ef299f9189b27e5e58485f1ffcf5}} 
\index{Wickr Protocol@{Wickr Protocol}!wickr\_parse\_result\_from\_packet@{wickr\_parse\_result\_from\_packet}}
\index{wickr\_parse\_result\_from\_packet@{wickr\_parse\_result\_from\_packet}!Wickr Protocol@{Wickr Protocol}}
\doxysubsubsection{\texorpdfstring{wickr\_parse\_result\_from\_packet()}{wickr\_parse\_result\_from\_packet()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__parse__result}{wickr\+\_\+parse\+\_\+result\+\_\+t}}$\ast$ wickr\+\_\+parse\+\_\+result\+\_\+from\+\_\+packet (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__crypto__engine}{wickr\+\_\+crypto\+\_\+engine\+\_\+t}} $\ast$}]{engine,  }\item[{const \mbox{\hyperlink{structwickr__packet}{wickr\+\_\+packet\+\_\+t}} $\ast$}]{packet,  }\item[{const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{receiver\+\_\+node\+\_\+id,  }\item[{wickr\+\_\+header\+\_\+keygen\+\_\+func}]{header\+\_\+keygen\+\_\+func,  }\item[{const \mbox{\hyperlink{structwickr__identity__chain}{wickr\+\_\+identity\+\_\+chain\+\_\+t}} $\ast$}]{sender\+\_\+signing\+\_\+identity }\end{DoxyParamCaption})}

Parse a received packet and validate it\textquotesingle{}s signature

For more information see Wickr white paper (Receiving a Message 1-\/5)

NOTE\+: This is a low level function that should not be called directly from this API if it can be avoided. Please use the \textquotesingle{}\mbox{\hyperlink{structwickr__ctx}{wickr\+\_\+ctx}}\textquotesingle{} API instead since it is a higher level and safer set of functions


\begin{DoxyParams}{Parameters}
{\em engine} & a crypto engine \\
\hline
{\em packet} & the packet to parse \\
\hline
{\em receiver\+\_\+node\+\_\+id} & node\+\_\+id of the recipient. If set, parsing will fail if a node\+\_\+id labeled key exchange is not found in the key exchange list. If not set, the resulting parse result will contain NULL for the key exchange and simply return all other properties \\
\hline
{\em header\+\_\+keygen\+\_\+func} & a function that can generate a header key for this packet \\
\hline
{\em sender\+\_\+signing\+\_\+identity} & the sender of the packet \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a parse result containing a successful or unsuccessful error and signature status 
\end{DoxyReturn}
