\hypertarget{group__wickr__kdf}{}\doxysection{wickr\+\_\+kdf}
\label{group__wickr__kdf}\index{wickr\_kdf@{wickr\_kdf}}
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structwickr__kdf__algo}{wickr\+\_\+kdf\+\_\+algo}}
\begin{DoxyCompactList}\small\item\em Metadata associated with a particular KDF function. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta}}
\begin{DoxyCompactList}\small\item\em Represents the information the KDF function will need along with it\textquotesingle{}s input to derive a particular output. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structwickr__kdf__result}{wickr\+\_\+kdf\+\_\+result}}
\begin{DoxyCompactList}\small\item\em Represents the result of a KDF function execution. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{group__wickr__kdf_ga5e8df13eb2cd5cc1e09f377675ddc50f}{SCRYPT\+\_\+2\+\_\+17\+\_\+\+COST}}~1116161
\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{group__wickr__kdf_ga106149e3507106abb6b5be843a4e7c16}{wickr\+\_\+kdf\+\_\+algo\+\_\+id}} \{ {\bfseries KDF\+\_\+\+BCRYPT}
, {\bfseries KDF\+\_\+\+SCRYPT}
, {\bfseries KDF\+\_\+\+HMAC\+\_\+\+SHA2}
 \}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__kdf_gaeee99bcfbf94fd964158ac402e2deb48}{wickr\+\_\+kdf\+\_\+meta\+\_\+create}} (\mbox{\hyperlink{structwickr__kdf__algo}{wickr\+\_\+kdf\+\_\+algo\+\_\+t}} algo, \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$salt, \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$info)
\item 
uint8\+\_\+t \mbox{\hyperlink{group__wickr__kdf_ga92020ae3e8ffb469c927d17f95a7dff1}{wickr\+\_\+kdf\+\_\+meta\+\_\+size\+\_\+with\+\_\+buffer}} (const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$buffer)
\item 
\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__kdf_ga1bc501706b4a8a727dfd34f8a00e56da}{wickr\+\_\+kdf\+\_\+meta\+\_\+serialize}} (const \mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta\+\_\+t}} $\ast$meta)
\item 
\mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__kdf_gaebd1caf94717c403c4afb5cca8f511b6}{wickr\+\_\+kdf\+\_\+meta\+\_\+create\+\_\+with\+\_\+buffer}} (const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$buffer)
\item 
\mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__kdf_ga6ed878108fd58ee420239689de505190}{wickr\+\_\+kdf\+\_\+meta\+\_\+copy}} (const \mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta\+\_\+t}} $\ast$source)
\item 
void \mbox{\hyperlink{group__wickr__kdf_ga2bd458ae83d4d5bb03b9d0835baeefd7}{wickr\+\_\+kdf\+\_\+meta\+\_\+destroy}} (\mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta\+\_\+t}} $\ast$$\ast$meta)
\item 
\mbox{\hyperlink{structwickr__kdf__result}{wickr\+\_\+kdf\+\_\+result\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__kdf_ga514c095b3b2f1ead49bd7fbf0b427407}{wickr\+\_\+kdf\+\_\+result\+\_\+create}} (\mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta\+\_\+t}} $\ast$meta, \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$hash)
\item 
\mbox{\hyperlink{structwickr__kdf__result}{wickr\+\_\+kdf\+\_\+result\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__kdf_ga69c03c94bf446471ba74f76ee883f8d4}{wickr\+\_\+kdf\+\_\+result\+\_\+copy}} (const \mbox{\hyperlink{structwickr__kdf__result}{wickr\+\_\+kdf\+\_\+result\+\_\+t}} $\ast$source)
\item 
void \mbox{\hyperlink{group__wickr__kdf_ga61ff0036a7257321ff0bbdc184d856a3}{wickr\+\_\+kdf\+\_\+result\+\_\+destroy}} (\mbox{\hyperlink{structwickr__kdf__result}{wickr\+\_\+kdf\+\_\+result\+\_\+t}} $\ast$$\ast$result)
\item 
\mbox{\hyperlink{structwickr__kdf__result}{wickr\+\_\+kdf\+\_\+result\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__kdf_gabc745cc1349f64c0f25d6d12de5f64cd}{wickr\+\_\+perform\+\_\+kdf}} (\mbox{\hyperlink{structwickr__kdf__algo}{wickr\+\_\+kdf\+\_\+algo\+\_\+t}} algo, const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$passphrase)
\item 
\mbox{\hyperlink{structwickr__kdf__result}{wickr\+\_\+kdf\+\_\+result\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__kdf_ga69674856e11652a18663fc7f833ad974}{wickr\+\_\+perform\+\_\+kdf\+\_\+meta}} (const \mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta\+\_\+t}} $\ast$existing\+\_\+meta, const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$passphrase)
\item 
const \mbox{\hyperlink{structwickr__kdf__algo}{wickr\+\_\+kdf\+\_\+algo\+\_\+t}} $\ast$ \mbox{\hyperlink{group__wickr__kdf_ga81c7a5adea69d04e019dd58080268a08}{wickr\+\_\+hkdf\+\_\+algo\+\_\+for\+\_\+digest}} (\mbox{\hyperlink{structwickr__digest}{wickr\+\_\+digest\+\_\+t}} digest)
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}


\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{group__wickr__kdf_ga5e8df13eb2cd5cc1e09f377675ddc50f}\label{group__wickr__kdf_ga5e8df13eb2cd5cc1e09f377675ddc50f}} 
\index{wickr\_kdf@{wickr\_kdf}!SCRYPT\_2\_17\_COST@{SCRYPT\_2\_17\_COST}}
\index{SCRYPT\_2\_17\_COST@{SCRYPT\_2\_17\_COST}!wickr\_kdf@{wickr\_kdf}}
\doxysubsubsection{\texorpdfstring{SCRYPT\_2\_17\_COST}{SCRYPT\_2\_17\_COST}}
{\footnotesize\ttfamily \#define SCRYPT\+\_\+2\+\_\+17\+\_\+\+COST~1116161}

Scrypt Cost

In order to conform to MCF format, scrypt provides a method of compressing its parameters into a single uint32 value. This calculation is leveraged here for the simplicity of having a single value represent N, r, and p values 

\doxysubsection{Enumeration Type Documentation}
\mbox{\Hypertarget{group__wickr__kdf_ga106149e3507106abb6b5be843a4e7c16}\label{group__wickr__kdf_ga106149e3507106abb6b5be843a4e7c16}} 
\index{wickr\_kdf@{wickr\_kdf}!wickr\_kdf\_algo\_id@{wickr\_kdf\_algo\_id}}
\index{wickr\_kdf\_algo\_id@{wickr\_kdf\_algo\_id}!wickr\_kdf@{wickr\_kdf}}
\doxysubsubsection{\texorpdfstring{wickr\_kdf\_algo\_id}{wickr\_kdf\_algo\_id}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{group__wickr__kdf_ga106149e3507106abb6b5be843a4e7c16}{wickr\+\_\+kdf\+\_\+algo\+\_\+id}}}

KDF Algorithm ID

Define the base algorithm a particular kdf function uses. Scrypt, Bcrypt, and HKDF are currently supported. The preferred default is to use scrypt, with a minimum of n = 2$^\wedge$17 

\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__wickr__kdf_ga81c7a5adea69d04e019dd58080268a08}\label{group__wickr__kdf_ga81c7a5adea69d04e019dd58080268a08}} 
\index{wickr\_kdf@{wickr\_kdf}!wickr\_hkdf\_algo\_for\_digest@{wickr\_hkdf\_algo\_for\_digest}}
\index{wickr\_hkdf\_algo\_for\_digest@{wickr\_hkdf\_algo\_for\_digest}!wickr\_kdf@{wickr\_kdf}}
\doxysubsubsection{\texorpdfstring{wickr\_hkdf\_algo\_for\_digest()}{wickr\_hkdf\_algo\_for\_digest()}}
{\footnotesize\ttfamily const \mbox{\hyperlink{structwickr__kdf__algo}{wickr\+\_\+kdf\+\_\+algo\+\_\+t}}$\ast$ wickr\+\_\+hkdf\+\_\+algo\+\_\+for\+\_\+digest (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structwickr__digest}{wickr\+\_\+digest\+\_\+t}}}]{digest }\end{DoxyParamCaption})}

Find the HKDF \mbox{\hyperlink{structwickr__kdf__algo}{wickr\+\_\+kdf\+\_\+algo}} that matches a specific digest


\begin{DoxyParams}{Parameters}
{\em digest} & the digest to search for \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
HKDF \mbox{\hyperlink{structwickr__kdf__algo}{wickr\+\_\+kdf\+\_\+algo}} that uses \textquotesingle{}digest\textquotesingle{} 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__kdf_ga6ed878108fd58ee420239689de505190}\label{group__wickr__kdf_ga6ed878108fd58ee420239689de505190}} 
\index{wickr\_kdf@{wickr\_kdf}!wickr\_kdf\_meta\_copy@{wickr\_kdf\_meta\_copy}}
\index{wickr\_kdf\_meta\_copy@{wickr\_kdf\_meta\_copy}!wickr\_kdf@{wickr\_kdf}}
\doxysubsubsection{\texorpdfstring{wickr\_kdf\_meta\_copy()}{wickr\_kdf\_meta\_copy()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta\+\_\+t}}$\ast$ wickr\+\_\+kdf\+\_\+meta\+\_\+copy (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta\+\_\+t}} $\ast$}]{source }\end{DoxyParamCaption})}

Copy a KDF Metadata set


\begin{DoxyParams}{Parameters}
{\em source} & the metadata set to copy \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated metadata set holding a deep copy of the properties of \textquotesingle{}source\textquotesingle{} 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__kdf_gaeee99bcfbf94fd964158ac402e2deb48}\label{group__wickr__kdf_gaeee99bcfbf94fd964158ac402e2deb48}} 
\index{wickr\_kdf@{wickr\_kdf}!wickr\_kdf\_meta\_create@{wickr\_kdf\_meta\_create}}
\index{wickr\_kdf\_meta\_create@{wickr\_kdf\_meta\_create}!wickr\_kdf@{wickr\_kdf}}
\doxysubsubsection{\texorpdfstring{wickr\_kdf\_meta\_create()}{wickr\_kdf\_meta\_create()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta\+\_\+t}}$\ast$ wickr\+\_\+kdf\+\_\+meta\+\_\+create (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structwickr__kdf__algo}{wickr\+\_\+kdf\+\_\+algo\+\_\+t}}}]{algo,  }\item[{\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{salt,  }\item[{\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{info }\end{DoxyParamCaption})}

Create a KDF Metadata set from components


\begin{DoxyParams}{Parameters}
{\em algo} & see \textquotesingle{}\mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta}}\textquotesingle{} property documentation \\
\hline
{\em salt} & see \textquotesingle{}\mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta}}\textquotesingle{} property documentation \\
\hline
{\em info} & see \textquotesingle{}\mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta}}\textquotesingle{} property documentation \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated KDF Metadata set, owning the properties that were passed in 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__kdf_gaebd1caf94717c403c4afb5cca8f511b6}\label{group__wickr__kdf_gaebd1caf94717c403c4afb5cca8f511b6}} 
\index{wickr\_kdf@{wickr\_kdf}!wickr\_kdf\_meta\_create\_with\_buffer@{wickr\_kdf\_meta\_create\_with\_buffer}}
\index{wickr\_kdf\_meta\_create\_with\_buffer@{wickr\_kdf\_meta\_create\_with\_buffer}!wickr\_kdf@{wickr\_kdf}}
\doxysubsubsection{\texorpdfstring{wickr\_kdf\_meta\_create\_with\_buffer()}{wickr\_kdf\_meta\_create\_with\_buffer()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta\+\_\+t}}$\ast$ wickr\+\_\+kdf\+\_\+meta\+\_\+create\+\_\+with\+\_\+buffer (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{buffer }\end{DoxyParamCaption})}

Create a KDF Metadata set from a buffer created by \textquotesingle{}wickr\+\_\+kdf\+\_\+meta\+\_\+serialize\textquotesingle{}


\begin{DoxyParams}{Parameters}
{\em buffer} & a buffer containing a bytes created by \textquotesingle{}wickr\+\_\+kdf\+\_\+meta\+\_\+serialize\textquotesingle{} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated KDF Metadata set. NULL if parsing fails because buffer does not contain valid bytes 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__kdf_ga2bd458ae83d4d5bb03b9d0835baeefd7}\label{group__wickr__kdf_ga2bd458ae83d4d5bb03b9d0835baeefd7}} 
\index{wickr\_kdf@{wickr\_kdf}!wickr\_kdf\_meta\_destroy@{wickr\_kdf\_meta\_destroy}}
\index{wickr\_kdf\_meta\_destroy@{wickr\_kdf\_meta\_destroy}!wickr\_kdf@{wickr\_kdf}}
\doxysubsubsection{\texorpdfstring{wickr\_kdf\_meta\_destroy()}{wickr\_kdf\_meta\_destroy()}}
{\footnotesize\ttfamily void wickr\+\_\+kdf\+\_\+meta\+\_\+destroy (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta\+\_\+t}} $\ast$$\ast$}]{meta }\end{DoxyParamCaption})}

Destroy a KDF Metadata set


\begin{DoxyParams}{Parameters}
{\em meta} & a pointer to the metadata set to destroy. All properties of \textquotesingle{}$\ast$meta\textquotesingle{} will also be destroyed \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__wickr__kdf_ga1bc501706b4a8a727dfd34f8a00e56da}\label{group__wickr__kdf_ga1bc501706b4a8a727dfd34f8a00e56da}} 
\index{wickr\_kdf@{wickr\_kdf}!wickr\_kdf\_meta\_serialize@{wickr\_kdf\_meta\_serialize}}
\index{wickr\_kdf\_meta\_serialize@{wickr\_kdf\_meta\_serialize}!wickr\_kdf@{wickr\_kdf}}
\doxysubsubsection{\texorpdfstring{wickr\_kdf\_meta\_serialize()}{wickr\_kdf\_meta\_serialize()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}}$\ast$ wickr\+\_\+kdf\+\_\+meta\+\_\+serialize (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta\+\_\+t}} $\ast$}]{meta }\end{DoxyParamCaption})}

Serialize a KDF Metadata set


\begin{DoxyParams}{Parameters}
{\em meta} & metadata set to serialize to a buffer \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a buffer containing serialized bytes from \textquotesingle{}meta\textquotesingle{} in the following format\+: $\vert$ ALGO\+\_\+\+ID $\vert$ SALT $\vert$ 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__kdf_ga92020ae3e8ffb469c927d17f95a7dff1}\label{group__wickr__kdf_ga92020ae3e8ffb469c927d17f95a7dff1}} 
\index{wickr\_kdf@{wickr\_kdf}!wickr\_kdf\_meta\_size\_with\_buffer@{wickr\_kdf\_meta\_size\_with\_buffer}}
\index{wickr\_kdf\_meta\_size\_with\_buffer@{wickr\_kdf\_meta\_size\_with\_buffer}!wickr\_kdf@{wickr\_kdf}}
\doxysubsubsection{\texorpdfstring{wickr\_kdf\_meta\_size\_with\_buffer()}{wickr\_kdf\_meta\_size\_with\_buffer()}}
{\footnotesize\ttfamily uint8\+\_\+t wickr\+\_\+kdf\+\_\+meta\+\_\+size\+\_\+with\+\_\+buffer (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{buffer }\end{DoxyParamCaption})}

Determine the size of serialized metadata given a serialized KDF Metadata buffer

This function is useful for determining the number of bytes within a larger buffer are part of the KDF metadata


\begin{DoxyParams}{Parameters}
{\em buffer} & a buffer beginning with bytes generated from \textquotesingle{}wickr\+\_\+kdf\+\_\+meta\+\_\+serialize\textquotesingle{} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the number of bytes consumed by a piece of serialized metadata at the beginning of buffer \textquotesingle{}buffer\textquotesingle{}. 0 if the buffer does not start with a valid piece of serialized metadata 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__kdf_ga69c03c94bf446471ba74f76ee883f8d4}\label{group__wickr__kdf_ga69c03c94bf446471ba74f76ee883f8d4}} 
\index{wickr\_kdf@{wickr\_kdf}!wickr\_kdf\_result\_copy@{wickr\_kdf\_result\_copy}}
\index{wickr\_kdf\_result\_copy@{wickr\_kdf\_result\_copy}!wickr\_kdf@{wickr\_kdf}}
\doxysubsubsection{\texorpdfstring{wickr\_kdf\_result\_copy()}{wickr\_kdf\_result\_copy()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__kdf__result}{wickr\+\_\+kdf\+\_\+result\+\_\+t}}$\ast$ wickr\+\_\+kdf\+\_\+result\+\_\+copy (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__kdf__result}{wickr\+\_\+kdf\+\_\+result\+\_\+t}} $\ast$}]{source }\end{DoxyParamCaption})}

Copy a KDF result


\begin{DoxyParams}{Parameters}
{\em source} & the metadata set to copy \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated kdf result holding a deep copy of the properties of \textquotesingle{}source\textquotesingle{} 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__kdf_ga514c095b3b2f1ead49bd7fbf0b427407}\label{group__wickr__kdf_ga514c095b3b2f1ead49bd7fbf0b427407}} 
\index{wickr\_kdf@{wickr\_kdf}!wickr\_kdf\_result\_create@{wickr\_kdf\_result\_create}}
\index{wickr\_kdf\_result\_create@{wickr\_kdf\_result\_create}!wickr\_kdf@{wickr\_kdf}}
\doxysubsubsection{\texorpdfstring{wickr\_kdf\_result\_create()}{wickr\_kdf\_result\_create()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__kdf__result}{wickr\+\_\+kdf\+\_\+result\+\_\+t}}$\ast$ wickr\+\_\+kdf\+\_\+result\+\_\+create (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta\+\_\+t}} $\ast$}]{meta,  }\item[{\mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{hash }\end{DoxyParamCaption})}

Create a KDF Result from components


\begin{DoxyParams}{Parameters}
{\em meta} & see \textquotesingle{}\mbox{\hyperlink{structwickr__kdf__result}{wickr\+\_\+kdf\+\_\+result}}\textquotesingle{} property documentation \\
\hline
{\em hash} & see \textquotesingle{}\mbox{\hyperlink{structwickr__kdf__result}{wickr\+\_\+kdf\+\_\+result}}\textquotesingle{} property documentation \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated KDF result, owning the properties that were passed in 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__kdf_ga61ff0036a7257321ff0bbdc184d856a3}\label{group__wickr__kdf_ga61ff0036a7257321ff0bbdc184d856a3}} 
\index{wickr\_kdf@{wickr\_kdf}!wickr\_kdf\_result\_destroy@{wickr\_kdf\_result\_destroy}}
\index{wickr\_kdf\_result\_destroy@{wickr\_kdf\_result\_destroy}!wickr\_kdf@{wickr\_kdf}}
\doxysubsubsection{\texorpdfstring{wickr\_kdf\_result\_destroy()}{wickr\_kdf\_result\_destroy()}}
{\footnotesize\ttfamily void wickr\+\_\+kdf\+\_\+result\+\_\+destroy (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structwickr__kdf__result}{wickr\+\_\+kdf\+\_\+result\+\_\+t}} $\ast$$\ast$}]{result }\end{DoxyParamCaption})}

Destroy a KDF result


\begin{DoxyParams}{Parameters}
{\em result} & a pointer to the result to destroy. All properties of \textquotesingle{}$\ast$result\textquotesingle{} will also be destroyed \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__wickr__kdf_gabc745cc1349f64c0f25d6d12de5f64cd}\label{group__wickr__kdf_gabc745cc1349f64c0f25d6d12de5f64cd}} 
\index{wickr\_kdf@{wickr\_kdf}!wickr\_perform\_kdf@{wickr\_perform\_kdf}}
\index{wickr\_perform\_kdf@{wickr\_perform\_kdf}!wickr\_kdf@{wickr\_kdf}}
\doxysubsubsection{\texorpdfstring{wickr\_perform\_kdf()}{wickr\_perform\_kdf()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__kdf__result}{wickr\+\_\+kdf\+\_\+result\+\_\+t}}$\ast$ wickr\+\_\+perform\+\_\+kdf (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structwickr__kdf__algo}{wickr\+\_\+kdf\+\_\+algo\+\_\+t}}}]{algo,  }\item[{const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{passphrase }\end{DoxyParamCaption})}

Execute a KDF function given an input buffer


\begin{DoxyParams}{Parameters}
{\em algo} & the algorithm info to use for execution of the KDF \\
\hline
{\em passphrase} & bytes to use as input to the KDF function. There are no restrictions for the content of the buffer \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the output of the KDF function, including the generated random salt that was used for the computation 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__kdf_ga69674856e11652a18663fc7f833ad974}\label{group__wickr__kdf_ga69674856e11652a18663fc7f833ad974}} 
\index{wickr\_kdf@{wickr\_kdf}!wickr\_perform\_kdf\_meta@{wickr\_perform\_kdf\_meta}}
\index{wickr\_perform\_kdf\_meta@{wickr\_perform\_kdf\_meta}!wickr\_kdf@{wickr\_kdf}}
\doxysubsubsection{\texorpdfstring{wickr\_perform\_kdf\_meta()}{wickr\_perform\_kdf\_meta()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structwickr__kdf__result}{wickr\+\_\+kdf\+\_\+result\+\_\+t}}$\ast$ wickr\+\_\+perform\+\_\+kdf\+\_\+meta (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structwickr__kdf__meta}{wickr\+\_\+kdf\+\_\+meta\+\_\+t}} $\ast$}]{existing\+\_\+meta,  }\item[{const \mbox{\hyperlink{structwickr__buffer}{wickr\+\_\+buffer\+\_\+t}} $\ast$}]{passphrase }\end{DoxyParamCaption})}

Execute a KDF function given an input buffer and specified parameters


\begin{DoxyParams}{Parameters}
{\em existing\+\_\+meta} & the parameters to use for execution, including a specific salt \\
\hline
{\em passphrase} & bytes to use as input to the KDF function. There are no restrictions for the content of the buffer \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the output of the KDF function, including the generated random salt that was used for the computation 
\end{DoxyReturn}
