\hypertarget{group__Emile__Cipher__Group}{}\section{Top level functions}
\label{group__Emile__Cipher__Group}\index{Top level functions@{Top level functions}}


Function that allow ciphering content.  


\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef enum \+\_\+\+Emile\+\_\+\+Cipher\+\_\+\+Backend \hyperlink{group__Emile__Cipher__Group_ga007d8d9ac1a4f51cdd1748c193339b0e}{Emile\+\_\+\+Cipher\+\_\+\+Backend}
\begin{DoxyCompactList}\small\item\em Flags describing the implemented backend. \end{DoxyCompactList}\item 
typedef enum \+\_\+\+Emile\+\_\+\+Cipher\+\_\+\+Algorithm \hyperlink{group__Emile__Cipher__Group_ga31e4855650932812fe4f59009b271db2}{Emile\+\_\+\+Cipher\+\_\+\+Algorithm}
\begin{DoxyCompactList}\small\item\em Flags describing known cipher algorithm. \end{DoxyCompactList}\item 
typedef struct \+\_\+\+Emile\+\_\+\+S\+SL {\bfseries Emile\+\_\+\+S\+SL}\hypertarget{group__Emile__Cipher__Group_ga1782d4c1a6cf5cb8abbf7eab42662b35}{}\label{group__Emile__Cipher__Group_ga1782d4c1a6cf5cb8abbf7eab42662b35}

\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum {\bfseries \+\_\+\+Emile\+\_\+\+Cipher\+\_\+\+Backend} \{ \\*
{\bfseries E\+M\+I\+L\+E\+\_\+\+N\+O\+NE}, 
\\*
{\bfseries E\+M\+I\+L\+E\+\_\+\+O\+P\+E\+N\+S\+SL}, 
\\*
{\bfseries E\+M\+I\+L\+E\+\_\+\+G\+N\+U\+T\+LS}
 \}\hypertarget{group__Emile__Cipher__Group_ga3b588c91bb3dde6b7a393d5fdfddaa42}{}\label{group__Emile__Cipher__Group_ga3b588c91bb3dde6b7a393d5fdfddaa42}

\item 
enum {\bfseries \+\_\+\+Emile\+\_\+\+Cipher\+\_\+\+Algorithm} \{ {\bfseries E\+M\+I\+L\+E\+\_\+\+A\+E\+S256\+\_\+\+C\+BC}
 \}\hypertarget{group__Emile__Cipher__Group_gad47127a7dba61ed2144f3948683e348a}{}\label{group__Emile__Cipher__Group_gad47127a7dba61ed2144f3948683e348a}

\item 
enum {\bfseries Emile\+\_\+\+Cipher\+\_\+\+Type} \{ \\*
{\bfseries E\+M\+I\+L\+E\+\_\+\+S\+S\+Lv23}, 
\\*
{\bfseries E\+M\+I\+L\+E\+\_\+\+T\+L\+Sv1}
 \}\hypertarget{group__Emile__Cipher__Group_gaf09cd634e61f33a0bee80a4d87d839de}{}\label{group__Emile__Cipher__Group_gaf09cd634e61f33a0bee80a4d87d839de}

\item 
enum {\bfseries Emile\+\_\+\+Want\+\_\+\+Type} \{ \\*
{\bfseries E\+M\+I\+L\+E\+\_\+\+W\+A\+N\+T\+\_\+\+N\+O\+T\+H\+I\+NG} = 0, 
\\*
{\bfseries E\+M\+I\+L\+E\+\_\+\+W\+A\+N\+T\+\_\+\+R\+E\+AD} = 1, 
\\*
{\bfseries E\+M\+I\+L\+E\+\_\+\+W\+A\+N\+T\+\_\+\+W\+R\+I\+TE} = 3
 \}\hypertarget{group__Emile__Cipher__Group_gaa414c7416eec83f241bdbeafa07e1fb7}{}\label{group__Emile__Cipher__Group_gaa414c7416eec83f241bdbeafa07e1fb7}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Emile__Cipher__Group_ga22b87d04488dcee57045ddc0888f4be8}{emile\+\_\+cipher\+\_\+init} (void)
\begin{DoxyCompactList}\small\item\em Force the initialization of the underlying cipher library. \end{DoxyCompactList}\item 
\hyperlink{group__Emile__Cipher__Group_ga007d8d9ac1a4f51cdd1748c193339b0e}{Emile\+\_\+\+Cipher\+\_\+\+Backend} \hyperlink{group__Emile__Cipher__Group_gaff7b637ff20e661a21b74b295631e965}{emile\+\_\+cipher\+\_\+module\+\_\+get} (void)
\begin{DoxyCompactList}\small\item\em Get the name of the current used backend. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$ \hyperlink{group__Emile__Cipher__Group_gab82453d27e8547121b8c8e9404e087aa}{emile\+\_\+binbuf\+\_\+cipher} (\hyperlink{group__Emile__Cipher__Group_ga31e4855650932812fe4f59009b271db2}{Emile\+\_\+\+Cipher\+\_\+\+Algorithm} algo, const \hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$in, const char $\ast$key, unsigned int length)
\begin{DoxyCompactList}\small\item\em Cipher a buffer with a defined algorithm and key. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$ \hyperlink{group__Emile__Cipher__Group_gacfc086a886e4bf13f3d04a2fe2835c7c}{emile\+\_\+binbuf\+\_\+decipher} (\hyperlink{group__Emile__Cipher__Group_ga31e4855650932812fe4f59009b271db2}{Emile\+\_\+\+Cipher\+\_\+\+Algorithm} algo, const \hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$in, const char $\ast$key, unsigned int length)
\begin{DoxyCompactList}\small\item\em Decipher a buffer with a defined algorithm and key. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} {\bfseries emile\+\_\+binbuf\+\_\+sha1} (const char $\ast$key, unsigned int key\+\_\+len, const \hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$data, unsigned char digest\mbox{[}20\mbox{]})\hypertarget{group__Emile__Cipher__Group_ga9234bdf194bc21e56d540e8c8b286035}{}\label{group__Emile__Cipher__Group_ga9234bdf194bc21e56d540e8c8b286035}

\item 
Emile\+\_\+\+S\+SL $\ast$ {\bfseries emile\+\_\+cipher\+\_\+server\+\_\+listen} (Emile\+\_\+\+Cipher\+\_\+\+Type t)\hypertarget{group__Emile__Cipher__Group_ga0631bf6d0357611ea350e5dbaeb2f615}{}\label{group__Emile__Cipher__Group_ga0631bf6d0357611ea350e5dbaeb2f615}

\item 
Emile\+\_\+\+S\+SL $\ast$ {\bfseries emile\+\_\+cipher\+\_\+client\+\_\+connect} (Emile\+\_\+\+S\+SL $\ast$server, int fd)\hypertarget{group__Emile__Cipher__Group_ga4da9a55f914859b28ec6d29542184631}{}\label{group__Emile__Cipher__Group_ga4da9a55f914859b28ec6d29542184631}

\item 
Emile\+\_\+\+S\+SL $\ast$ {\bfseries emile\+\_\+cipher\+\_\+server\+\_\+connect} (Emile\+\_\+\+Cipher\+\_\+\+Type t)\hypertarget{group__Emile__Cipher__Group_ga32ed8c85b7b7b9328b12fd7344fd2b46}{}\label{group__Emile__Cipher__Group_ga32ed8c85b7b7b9328b12fd7344fd2b46}

\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} {\bfseries emile\+\_\+cipher\+\_\+free} (Emile\+\_\+\+S\+SL $\ast$emile)\hypertarget{group__Emile__Cipher__Group_ga1b75a23e9c01168d510383a19bb8f575}{}\label{group__Emile__Cipher__Group_ga1b75a23e9c01168d510383a19bb8f575}

\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} {\bfseries emile\+\_\+cipher\+\_\+cafile\+\_\+add} (Emile\+\_\+\+S\+SL $\ast$emile, const char $\ast$file)\hypertarget{group__Emile__Cipher__Group_ga629e3f86408a184f2198afce54732ee7}{}\label{group__Emile__Cipher__Group_ga629e3f86408a184f2198afce54732ee7}

\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} {\bfseries emile\+\_\+cipher\+\_\+cert\+\_\+add} (Emile\+\_\+\+S\+SL $\ast$emile, const char $\ast$file)\hypertarget{group__Emile__Cipher__Group_gaf2cabacb1d9715b9909f3315857ffd99}{}\label{group__Emile__Cipher__Group_gaf2cabacb1d9715b9909f3315857ffd99}

\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} {\bfseries emile\+\_\+cipher\+\_\+privkey\+\_\+add} (Emile\+\_\+\+S\+SL $\ast$emile, const char $\ast$file)\hypertarget{group__Emile__Cipher__Group_ga68e0279875dcafcb0fcc157f86a6c498}{}\label{group__Emile__Cipher__Group_ga68e0279875dcafcb0fcc157f86a6c498}

\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} {\bfseries emile\+\_\+cipher\+\_\+crl\+\_\+add} (Emile\+\_\+\+S\+SL $\ast$emile, const char $\ast$file)\hypertarget{group__Emile__Cipher__Group_ga6de70e914cdcb459143bbf1e648cdf39}{}\label{group__Emile__Cipher__Group_ga6de70e914cdcb459143bbf1e648cdf39}

\item 
int {\bfseries emile\+\_\+cipher\+\_\+read} (Emile\+\_\+\+S\+SL $\ast$emile, \hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$buffer)\hypertarget{group__Emile__Cipher__Group_gab1bee8b8563fdd613a27bed203ea8361}{}\label{group__Emile__Cipher__Group_gab1bee8b8563fdd613a27bed203ea8361}

\item 
int {\bfseries emile\+\_\+cipher\+\_\+write} (Emile\+\_\+\+S\+SL $\ast$emile, const \hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$buffer)\hypertarget{group__Emile__Cipher__Group_ga07ff0b3f04b455b7cb6d9e1a0ace5f99}{}\label{group__Emile__Cipher__Group_ga07ff0b3f04b455b7cb6d9e1a0ace5f99}

\item 
const char $\ast$ {\bfseries emile\+\_\+cipher\+\_\+error\+\_\+get} (const Emile\+\_\+\+S\+SL $\ast$emile)\hypertarget{group__Emile__Cipher__Group_ga10d0aecb0a53319e7d29bb5505fedc14}{}\label{group__Emile__Cipher__Group_ga10d0aecb0a53319e7d29bb5505fedc14}

\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} {\bfseries emile\+\_\+cipher\+\_\+verify\+\_\+name\+\_\+set} (Emile\+\_\+\+S\+SL $\ast$emile, const char $\ast$name)\hypertarget{group__Emile__Cipher__Group_ga1ffe538591dce4bb50bfdaea8b9d7237}{}\label{group__Emile__Cipher__Group_ga1ffe538591dce4bb50bfdaea8b9d7237}

\item 
const char $\ast$ {\bfseries emile\+\_\+cipher\+\_\+verify\+\_\+name\+\_\+get} (const Emile\+\_\+\+S\+SL $\ast$emile)\hypertarget{group__Emile__Cipher__Group_gab44d4dadee1579bcd80837a555cef197}{}\label{group__Emile__Cipher__Group_gab44d4dadee1579bcd80837a555cef197}

\item 
void {\bfseries emile\+\_\+cipher\+\_\+verify\+\_\+set} (Emile\+\_\+\+S\+SL $\ast$emile, \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} verify)\hypertarget{group__Emile__Cipher__Group_gab9d3919cc29732cb49f963ffdbc7aaf7}{}\label{group__Emile__Cipher__Group_gab9d3919cc29732cb49f963ffdbc7aaf7}

\item 
void {\bfseries emile\+\_\+cipher\+\_\+verify\+\_\+basic\+\_\+set} (Emile\+\_\+\+S\+SL $\ast$emile, \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} verify\+\_\+basic)\hypertarget{group__Emile__Cipher__Group_gaf9653f35ffc3638b4cbc3a2388fe638c}{}\label{group__Emile__Cipher__Group_gaf9653f35ffc3638b4cbc3a2388fe638c}

\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} {\bfseries emile\+\_\+cipher\+\_\+verify\+\_\+get} (const Emile\+\_\+\+S\+SL $\ast$emile)\hypertarget{group__Emile__Cipher__Group_gae93421b424b7d1b9bd812ef73a00f5b6}{}\label{group__Emile__Cipher__Group_gae93421b424b7d1b9bd812ef73a00f5b6}

\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} {\bfseries emile\+\_\+cipher\+\_\+verify\+\_\+basic\+\_\+get} (const Emile\+\_\+\+S\+SL $\ast$emile)\hypertarget{group__Emile__Cipher__Group_ga05c3ad3ce4934164f61b9381bf870b4a}{}\label{group__Emile__Cipher__Group_ga05c3ad3ce4934164f61b9381bf870b4a}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Function that allow ciphering content. 



\subsection{Typedef Documentation}
\index{Top level functions@{Top level functions}!Emile\+\_\+\+Cipher\+\_\+\+Backend@{Emile\+\_\+\+Cipher\+\_\+\+Backend}}
\index{Emile\+\_\+\+Cipher\+\_\+\+Backend@{Emile\+\_\+\+Cipher\+\_\+\+Backend}!Top level functions@{Top level functions}}
\subsubsection[{\texorpdfstring{Emile\+\_\+\+Cipher\+\_\+\+Backend}{Emile_Cipher_Backend}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Emile\+\_\+\+Cipher\+\_\+\+Backend}}\hypertarget{group__Emile__Cipher__Group_ga007d8d9ac1a4f51cdd1748c193339b0e}{}\label{group__Emile__Cipher__Group_ga007d8d9ac1a4f51cdd1748c193339b0e}


Flags describing the implemented backend. 

\begin{DoxySince}{Since}
1.\+14 
\end{DoxySince}
\index{Top level functions@{Top level functions}!Emile\+\_\+\+Cipher\+\_\+\+Algorithm@{Emile\+\_\+\+Cipher\+\_\+\+Algorithm}}
\index{Emile\+\_\+\+Cipher\+\_\+\+Algorithm@{Emile\+\_\+\+Cipher\+\_\+\+Algorithm}!Top level functions@{Top level functions}}
\subsubsection[{\texorpdfstring{Emile\+\_\+\+Cipher\+\_\+\+Algorithm}{Emile_Cipher_Algorithm}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Emile\+\_\+\+Cipher\+\_\+\+Algorithm}}\hypertarget{group__Emile__Cipher__Group_ga31e4855650932812fe4f59009b271db2}{}\label{group__Emile__Cipher__Group_ga31e4855650932812fe4f59009b271db2}


Flags describing known cipher algorithm. 

\begin{DoxySince}{Since}
1.\+14 
\end{DoxySince}


\subsection{Function Documentation}
\index{Top level functions@{Top level functions}!emile\+\_\+cipher\+\_\+init@{emile\+\_\+cipher\+\_\+init}}
\index{emile\+\_\+cipher\+\_\+init@{emile\+\_\+cipher\+\_\+init}!Top level functions@{Top level functions}}
\subsubsection[{\texorpdfstring{emile\+\_\+cipher\+\_\+init(void)}{emile_cipher_init(void)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\+\_\+\+Bool} emile\+\_\+cipher\+\_\+init (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{group__Emile__Cipher__Group_ga22b87d04488dcee57045ddc0888f4be8}{}\label{group__Emile__Cipher__Group_ga22b87d04488dcee57045ddc0888f4be8}


Force the initialization of the underlying cipher library. 

This call force the initialisation of G\+N\+U\+T\+LS or Open\+S\+SL, so that you get the same setup for everyone.

\begin{DoxyReturn}{Returns}
E\+I\+N\+A\+\_\+\+T\+R\+UE on success, E\+I\+N\+A\+\_\+\+F\+A\+L\+SE otherwise. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Emile__Cipher__Group_gaff7b637ff20e661a21b74b295631e965}{emile\+\_\+cipher\+\_\+module\+\_\+get}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+14 
\end{DoxySince}


References E\+I\+N\+A\+\_\+\+F\+A\+L\+SE, and E\+I\+N\+A\+\_\+\+T\+R\+UE.



Referenced by eet\+\_\+identity\+\_\+certificate\+\_\+print(), eet\+\_\+identity\+\_\+close(), eet\+\_\+identity\+\_\+open(), eet\+\_\+identity\+\_\+print(), emile\+\_\+binbuf\+\_\+cipher(), and emile\+\_\+binbuf\+\_\+decipher().

\index{Top level functions@{Top level functions}!emile\+\_\+cipher\+\_\+module\+\_\+get@{emile\+\_\+cipher\+\_\+module\+\_\+get}}
\index{emile\+\_\+cipher\+\_\+module\+\_\+get@{emile\+\_\+cipher\+\_\+module\+\_\+get}!Top level functions@{Top level functions}}
\subsubsection[{\texorpdfstring{emile\+\_\+cipher\+\_\+module\+\_\+get(void)}{emile_cipher_module_get(void)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Emile\+\_\+\+Cipher\+\_\+\+Backend} emile\+\_\+cipher\+\_\+module\+\_\+get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{group__Emile__Cipher__Group_gaff7b637ff20e661a21b74b295631e965}{}\label{group__Emile__Cipher__Group_gaff7b637ff20e661a21b74b295631e965}


Get the name of the current used backend. 

\begin{DoxyReturn}{Returns}
the name of the current cipher backend. 
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+14 
\end{DoxySince}
\index{Top level functions@{Top level functions}!emile\+\_\+binbuf\+\_\+cipher@{emile\+\_\+binbuf\+\_\+cipher}}
\index{emile\+\_\+binbuf\+\_\+cipher@{emile\+\_\+binbuf\+\_\+cipher}!Top level functions@{Top level functions}}
\subsubsection[{\texorpdfstring{emile\+\_\+binbuf\+\_\+cipher(\+Emile\+\_\+\+Cipher\+\_\+\+Algorithm algo, const Eina\+\_\+\+Binbuf $\ast$in, const char $\ast$key, unsigned int length)}{emile_binbuf_cipher(Emile_Cipher_Algorithm algo, const Eina_Binbuf *in, const char *key, unsigned int length)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\+\_\+\+Binbuf}$\ast$ emile\+\_\+binbuf\+\_\+cipher (
\begin{DoxyParamCaption}
\item[{{\bf Emile\+\_\+\+Cipher\+\_\+\+Algorithm}}]{algo, }
\item[{const {\bf Eina\+\_\+\+Binbuf} $\ast$}]{in, }
\item[{const char $\ast$}]{key, }
\item[{unsigned int}]{length}
\end{DoxyParamCaption}
)}\hypertarget{group__Emile__Cipher__Group_gab82453d27e8547121b8c8e9404e087aa}{}\label{group__Emile__Cipher__Group_gab82453d27e8547121b8c8e9404e087aa}


Cipher a buffer with a defined algorithm and key. 


\begin{DoxyParams}{Parameters}
{\em algo} & The algorithm to use to cipher the buffer. \\
\hline
{\em in} & The buffer to cipher. \\
\hline
{\em key} & The symetric key to use for ciphering. \\
\hline
{\em length} & The length of the symetric key to be used. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the ciphered buffer or N\+U\+LL on error.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+14 
\end{DoxySince}


References eina\+\_\+binbuf\+\_\+append\+\_\+buffer(), eina\+\_\+binbuf\+\_\+append\+\_\+length(), eina\+\_\+binbuf\+\_\+free(), eina\+\_\+binbuf\+\_\+length\+\_\+get(), eina\+\_\+binbuf\+\_\+new(), eina\+\_\+binbuf\+\_\+remove(), eina\+\_\+binbuf\+\_\+string\+\_\+get(), and emile\+\_\+cipher\+\_\+init().



Referenced by eet\+\_\+identity\+\_\+certificate\+\_\+print(), and eet\+\_\+write\+\_\+cipher().

\index{Top level functions@{Top level functions}!emile\+\_\+binbuf\+\_\+decipher@{emile\+\_\+binbuf\+\_\+decipher}}
\index{emile\+\_\+binbuf\+\_\+decipher@{emile\+\_\+binbuf\+\_\+decipher}!Top level functions@{Top level functions}}
\subsubsection[{\texorpdfstring{emile\+\_\+binbuf\+\_\+decipher(\+Emile\+\_\+\+Cipher\+\_\+\+Algorithm algo, const Eina\+\_\+\+Binbuf $\ast$in, const char $\ast$key, unsigned int length)}{emile_binbuf_decipher(Emile_Cipher_Algorithm algo, const Eina_Binbuf *in, const char *key, unsigned int length)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\+\_\+\+Binbuf}$\ast$ emile\+\_\+binbuf\+\_\+decipher (
\begin{DoxyParamCaption}
\item[{{\bf Emile\+\_\+\+Cipher\+\_\+\+Algorithm}}]{algo, }
\item[{const {\bf Eina\+\_\+\+Binbuf} $\ast$}]{in, }
\item[{const char $\ast$}]{key, }
\item[{unsigned int}]{length}
\end{DoxyParamCaption}
)}\hypertarget{group__Emile__Cipher__Group_gacfc086a886e4bf13f3d04a2fe2835c7c}{}\label{group__Emile__Cipher__Group_gacfc086a886e4bf13f3d04a2fe2835c7c}


Decipher a buffer with a defined algorithm and key. 


\begin{DoxyParams}{Parameters}
{\em algo} & The algorithm to use to decipher the buffer. \\
\hline
{\em in} & The ciphered buffer to decipher. \\
\hline
{\em key} & The symetric key used to cipher the buffer. \\
\hline
{\em length} & The length of the symetric key used to cipher the buffer. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the clear buffer or N\+U\+LL on error.
\end{DoxyReturn}
\begin{DoxyNote}{Note}
This won\textquotesingle{}t detect if the given key is the correct one or not. You have to check that the returned data make sense. You should also not treat them as safe.
\end{DoxyNote}
\begin{DoxySince}{Since}
1.\+14 
\end{DoxySince}


References alloca(), D\+BG, eina\+\_\+binbuf\+\_\+append\+\_\+length(), eina\+\_\+binbuf\+\_\+free(), eina\+\_\+binbuf\+\_\+length\+\_\+get(), eina\+\_\+binbuf\+\_\+new(), eina\+\_\+binbuf\+\_\+remove(), eina\+\_\+binbuf\+\_\+string\+\_\+get(), E\+I\+N\+A\+\_\+\+F\+A\+L\+SE, eina\+\_\+file\+\_\+close(), eina\+\_\+file\+\_\+direct\+\_\+ls(), E\+I\+N\+A\+\_\+\+F\+I\+L\+E\+\_\+\+L\+NK, eina\+\_\+file\+\_\+map\+\_\+all(), eina\+\_\+file\+\_\+map\+\_\+free(), eina\+\_\+file\+\_\+open(), E\+I\+N\+A\+\_\+\+F\+I\+L\+E\+\_\+\+R\+EG, eina\+\_\+file\+\_\+size\+\_\+get(), E\+I\+N\+A\+\_\+\+F\+I\+L\+E\+\_\+\+U\+N\+K\+N\+O\+WN, E\+I\+N\+A\+\_\+\+F\+I\+L\+E\+\_\+\+W\+I\+L\+L\+N\+E\+ED, E\+I\+N\+A\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+O\+R\+E\+A\+CH, eina\+\_\+iterator\+\_\+free(), E\+I\+N\+A\+\_\+\+L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+D\+BG, eina\+\_\+strbuf\+\_\+append\+\_\+length(), eina\+\_\+strbuf\+\_\+free(), eina\+\_\+strbuf\+\_\+new(), eina\+\_\+strbuf\+\_\+reset(), eina\+\_\+strbuf\+\_\+string\+\_\+get(), eina\+\_\+stringshare\+\_\+del(), E\+I\+N\+A\+\_\+\+T\+R\+UE, E\+I\+N\+A\+\_\+\+U\+N\+U\+S\+ED, emile\+\_\+cipher\+\_\+init(), E\+RR, I\+NF, and \+\_\+\+Eina\+\_\+\+File\+\_\+\+Direct\+\_\+\+Info\+::type.



Referenced by eet\+\_\+identity\+\_\+certificate\+\_\+print(), and eet\+\_\+read\+\_\+cipher().

