\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}\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Emile__Cipher__Group_ga3b588c91bb3dde6b7a393d5fdfddaa42}{}enum {\bfseries \+\_\+\+Emile\+\_\+\+Cipher\+\_\+\+Backend} \{ \\*
{\bfseries E\+M\+I\+L\+E\+\_\+\+N\+O\+N\+E}, 
\\*
{\bfseries E\+M\+I\+L\+E\+\_\+\+O\+P\+E\+N\+S\+S\+L}, 
\\*
{\bfseries E\+M\+I\+L\+E\+\_\+\+G\+N\+U\+T\+L\+S}
 \}\label{group__Emile__Cipher__Group_ga3b588c91bb3dde6b7a393d5fdfddaa42}

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

\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}\end{DoxyCompactItemize}


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



\subsection{Typedef Documentation}
\hypertarget{group__Emile__Cipher__Group_ga007d8d9ac1a4f51cdd1748c193339b0e}{}\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[{Emile\+\_\+\+Cipher\+\_\+\+Backend}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Emile\+\_\+\+Cipher\+\_\+\+Backend}}\label{group__Emile__Cipher__Group_ga007d8d9ac1a4f51cdd1748c193339b0e}


Flags describing the implemented backend. 

\begin{DoxySince}{Since}
1.\+14 
\end{DoxySince}
\hypertarget{group__Emile__Cipher__Group_ga31e4855650932812fe4f59009b271db2}{}\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[{Emile\+\_\+\+Cipher\+\_\+\+Algorithm}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Emile\+\_\+\+Cipher\+\_\+\+Algorithm}}\label{group__Emile__Cipher__Group_ga31e4855650932812fe4f59009b271db2}


Flags describing known cipher algorithm. 

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


\subsection{Function Documentation}
\hypertarget{group__Emile__Cipher__Group_ga22b87d04488dcee57045ddc0888f4be8}{}\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[{emile\+\_\+cipher\+\_\+init}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\+\_\+\+Bool} emile\+\_\+cipher\+\_\+init (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{group__Emile__Cipher__Group_ga22b87d04488dcee57045ddc0888f4be8}


Force the initialization of the underlying cipher library. 

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

\begin{DoxyReturn}{Returns}
E\+I\+N\+A\+\_\+\+T\+R\+U\+E on success, E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E 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\+S\+E, and E\+I\+N\+A\+\_\+\+T\+R\+U\+E.



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

\hypertarget{group__Emile__Cipher__Group_gaff7b637ff20e661a21b74b295631e965}{}\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[{emile\+\_\+cipher\+\_\+module\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Emile\+\_\+\+Cipher\+\_\+\+Backend} emile\+\_\+cipher\+\_\+module\+\_\+get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\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}
\hypertarget{group__Emile__Cipher__Group_gab82453d27e8547121b8c8e9404e087aa}{}\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[{emile\+\_\+binbuf\+\_\+cipher}]{\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}
)}\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\+L\+L 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\+\_\+write\+\_\+cipher().

\hypertarget{group__Emile__Cipher__Group_gacfc086a886e4bf13f3d04a2fe2835c7c}{}\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[{emile\+\_\+binbuf\+\_\+decipher}]{\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}
)}\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\+L\+L 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 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\+\_\+read\+\_\+cipher().

