\hypertarget{group__Eet__Cipher__Group}{}\doxysection{Cipher, Identity and Protection Mechanisms}
\label{group__Eet__Cipher__Group}\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}


Eet allows one to protect entries of an \mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} individually.  


\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}\label{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}} 
typedef struct \+\_\+\+Eet\+\_\+\+Key {\bfseries Eet\+\_\+\+Key}
\begin{DoxyCompactList}\small\item\em Opaque handle that defines an identity (also known as key) in Eet\textquotesingle{}s cipher system. \end{DoxyCompactList}\item 
typedef int($\ast$ \mbox{\hyperlink{group__Eet__Cipher__Group_ga37fcf12b2139e1084d01a7bc5d999ed9}{Eet\+\_\+\+Key\+\_\+\+Password\+\_\+\+Callback}}) (char $\ast$buffer, int size, int rwflag, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Callback used to request if needed the password of a private key. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
EAPI \mbox{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key}} $\ast$ \mbox{\hyperlink{group__Eet__Cipher__Group_ga0bedcc0ed03bcf6f09002cc888c755e2}{eet\+\_\+identity\+\_\+open}} (const char $\ast$certificate\+\_\+file, const char $\ast$private\+\_\+key\+\_\+file, \mbox{\hyperlink{group__Eet__Cipher__Group_ga37fcf12b2139e1084d01a7bc5d999ed9}{Eet\+\_\+\+Key\+\_\+\+Password\+\_\+\+Callback}} cb)
\begin{DoxyCompactList}\small\item\em Creates an Eet\+\_\+\+Key needed for signing an eet file. \end{DoxyCompactList}\item 
EAPI void \mbox{\hyperlink{group__Eet__Cipher__Group_gaa8b2e329d0ecdb55b564e1aa70ba557f}{eet\+\_\+identity\+\_\+close}} (\mbox{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key}} $\ast$key)
\begin{DoxyCompactList}\small\item\em Close and release all resource used by an Eet\+\_\+\+Key. \end{DoxyCompactList}\item 
EAPI \mbox{\hyperlink{group__Eet__Group_ga966e47d17fb3f81293bc0ada3c031d95}{Eet\+\_\+\+Error}} \mbox{\hyperlink{group__Eet__Cipher__Group_ga687984e5f508017c01f6d22a203fce16}{eet\+\_\+identity\+\_\+set}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$ef, \mbox{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key}} $\ast$key)
\begin{DoxyCompactList}\small\item\em Sets a key to sign a file. \end{DoxyCompactList}\item 
EAPI void \mbox{\hyperlink{group__Eet__Cipher__Group_ga846b1e0f0f4a1a9c7ab9a4fc55728534}{eet\+\_\+identity\+\_\+print}} (\mbox{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key}} $\ast$key, FILE $\ast$out)
\begin{DoxyCompactList}\small\item\em Displays both private and public key of an Eet\+\_\+\+Key. \end{DoxyCompactList}\item 
EAPI \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eet__Cipher__Group_ga29c3b343fd972696ff5bbd7bf928fb7e}{eet\+\_\+identity\+\_\+verify}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$ef, const char $\ast$certificate\+\_\+file)
\begin{DoxyCompactList}\small\item\em Compares the identify certificate of an eet file against a stored one. \end{DoxyCompactList}\item 
EAPI const void $\ast$ \mbox{\hyperlink{group__Eet__Cipher__Group_ga0350f0b19bc28dfcda60db1675f2512e}{eet\+\_\+identity\+\_\+x509}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$ef, int $\ast$der\+\_\+length)
\begin{DoxyCompactList}\small\item\em Gets the x509 der certificate associated with an Eet\+\_\+\+File. \end{DoxyCompactList}\item 
EAPI const void $\ast$ \mbox{\hyperlink{group__Eet__Cipher__Group_ga67da122d9baa4a08af5850eae06ef906}{eet\+\_\+identity\+\_\+signature}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$ef, int $\ast$signature\+\_\+length)
\begin{DoxyCompactList}\small\item\em Gets the raw signature associated with an Eet\+\_\+\+File. \end{DoxyCompactList}\item 
EAPI const void $\ast$ \mbox{\hyperlink{group__Eet__Cipher__Group_ga09d377eb82eb99003564d9005dea4c9e}{eet\+\_\+identity\+\_\+sha1}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$ef, int $\ast$sha1\+\_\+length)
\begin{DoxyCompactList}\small\item\em Gets the SHA1 associated with a file. \end{DoxyCompactList}\item 
EAPI void \mbox{\hyperlink{group__Eet__Cipher__Group_ga131e4a43a0ae98dc31a9a642ada33357}{eet\+\_\+identity\+\_\+certificate\+\_\+print}} (const unsigned char $\ast$certificate, int der\+\_\+length, FILE $\ast$out)
\begin{DoxyCompactList}\small\item\em Displays the x509 der certificate to out. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Eet allows one to protect entries of an \mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} individually. 

This may be used to ensure data was not tampered or that third party does not read your data.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eet__File__Cipher__Group}{Eet File Ciphered Main Functions}} 

\mbox{\hyperlink{group__Eet__File__Image__Cipher__Group}{Image Store and Load using a Cipher}} 
\end{DoxySeeAlso}


\doxysubsection{Typedef Documentation}
\mbox{\Hypertarget{group__Eet__Cipher__Group_ga37fcf12b2139e1084d01a7bc5d999ed9}\label{group__Eet__Cipher__Group_ga37fcf12b2139e1084d01a7bc5d999ed9}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!Eet\_Key\_Password\_Callback@{Eet\_Key\_Password\_Callback}}
\index{Eet\_Key\_Password\_Callback@{Eet\_Key\_Password\_Callback}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\doxysubsubsection{\texorpdfstring{Eet\_Key\_Password\_Callback}{Eet\_Key\_Password\_Callback}}
{\footnotesize\ttfamily typedef int($\ast$ Eet\+\_\+\+Key\+\_\+\+Password\+\_\+\+Callback) (char $\ast$buffer, int size, int rwflag, void $\ast$data)}



Callback used to request if needed the password of a private key. 


\begin{DoxyParams}{Parameters}
{\em buffer} & the buffer where to store the password. \\
\hline
{\em size} & the maximum password size (size of buffer, including \textquotesingle{}\textbackslash{}0\textquotesingle{}). \\
\hline
{\em rwflag} & if the buffer is also readable or just writable. \\
\hline
{\em data} & currently unused, may contain some context in future. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily 1} on success and password was set to {\ttfamily buffer}, {\ttfamily 0} on failure.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+2.\+0 
\end{DoxySince}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Eet__Cipher__Group_ga0bedcc0ed03bcf6f09002cc888c755e2}\label{group__Eet__Cipher__Group_ga0bedcc0ed03bcf6f09002cc888c755e2}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!eet\_identity\_open@{eet\_identity\_open}}
\index{eet\_identity\_open@{eet\_identity\_open}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\doxysubsubsection{\texorpdfstring{eet\_identity\_open()}{eet\_identity\_open()}}
{\footnotesize\ttfamily EAPI \mbox{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key}} $\ast$ eet\+\_\+identity\+\_\+open (\begin{DoxyParamCaption}\item[{const char $\ast$}]{certificate\+\_\+file,  }\item[{const char $\ast$}]{private\+\_\+key\+\_\+file,  }\item[{\mbox{\hyperlink{group__Eet__Cipher__Group_ga37fcf12b2139e1084d01a7bc5d999ed9}{Eet\+\_\+\+Key\+\_\+\+Password\+\_\+\+Callback}}}]{cb }\end{DoxyParamCaption})}



Creates an Eet\+\_\+\+Key needed for signing an eet file. 

The certificate should provide the public that match the private key. No verification is done to ensure that.


\begin{DoxyParams}{Parameters}
{\em certificate\+\_\+file} & The file where to find the certificate. \\
\hline
{\em private\+\_\+key\+\_\+file} & The file that contains the private key. \\
\hline
{\em cb} & Function to callback if password is required to unlock private key. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A key handle to use, or {\ttfamily NULL} on failure.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eet__Cipher__Group_gaa8b2e329d0ecdb55b564e1aa70ba557f}{eet\+\_\+identity\+\_\+close()}}
\end{DoxySeeAlso}
\begin{DoxyWarning}{Warning}
You need to compile signature support in EET. 
\end{DoxyWarning}
\begin{DoxySince}{Since}
1.\+2.\+0 
\end{DoxySince}


References \mbox{\hyperlink{group__Eina__File__Group_ga6b19a0682a3747cb5c313dc7d0e41a90}{eina\+\_\+file\+\_\+close()}}, \mbox{\hyperlink{group__Eina__File__Group_gaae165c21af09fca39c2d1f89a92cb6b1}{eina\+\_\+file\+\_\+map\+\_\+all()}}, \mbox{\hyperlink{group__Eina__File__Group_gaf52b237fec73dbbcd411c8f999c5b5df}{eina\+\_\+file\+\_\+map\+\_\+free()}}, \mbox{\hyperlink{group__Eina__File__Group_ga9579ba508358c74ea57bd8906801cfe5}{eina\+\_\+file\+\_\+open()}}, \mbox{\hyperlink{group__Eina__File__Group_gga2788825dfdd797282112148f2f65ec7aabb92031c2d448a1659117121866229b2}{EINA\+\_\+\+FILE\+\_\+\+SEQUENTIAL}}, \mbox{\hyperlink{group__Eina__File__Group_ga2f57057d1d66e6392a832674a69c1278}{eina\+\_\+file\+\_\+size\+\_\+get()}}, \mbox{\hyperlink{group__Eina__Mmap__Group_gaf51405e08c9985f057b8d0137846c905}{eina\+\_\+mmap\+\_\+safety\+\_\+enabled\+\_\+set()}}, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}, and \mbox{\hyperlink{group__Emile__Cipher__Group_ga22b87d04488dcee57045ddc0888f4be8}{emile\+\_\+cipher\+\_\+init()}}.

\mbox{\Hypertarget{group__Eet__Cipher__Group_gaa8b2e329d0ecdb55b564e1aa70ba557f}\label{group__Eet__Cipher__Group_gaa8b2e329d0ecdb55b564e1aa70ba557f}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!eet\_identity\_close@{eet\_identity\_close}}
\index{eet\_identity\_close@{eet\_identity\_close}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\doxysubsubsection{\texorpdfstring{eet\_identity\_close()}{eet\_identity\_close()}}
{\footnotesize\ttfamily EAPI void eet\+\_\+identity\+\_\+close (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key}} $\ast$}]{key }\end{DoxyParamCaption})}



Close and release all resource used by an Eet\+\_\+\+Key. 

A reference counter prevent it from being freed until all file using it are also closed.


\begin{DoxyParams}{Parameters}
{\em key} & the key handle to close and free resources.\\
\hline
\end{DoxyParams}
\begin{DoxySince}{Since}
1.\+2.\+0 
\end{DoxySince}


References \mbox{\hyperlink{group__Emile__Cipher__Group_ga22b87d04488dcee57045ddc0888f4be8}{emile\+\_\+cipher\+\_\+init()}}.

\mbox{\Hypertarget{group__Eet__Cipher__Group_ga687984e5f508017c01f6d22a203fce16}\label{group__Eet__Cipher__Group_ga687984e5f508017c01f6d22a203fce16}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!eet\_identity\_set@{eet\_identity\_set}}
\index{eet\_identity\_set@{eet\_identity\_set}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\doxysubsubsection{\texorpdfstring{eet\_identity\_set()}{eet\_identity\_set()}}
{\footnotesize\ttfamily EAPI \mbox{\hyperlink{group__Eet__Group_ga966e47d17fb3f81293bc0ada3c031d95}{Eet\+\_\+\+Error}} eet\+\_\+identity\+\_\+set (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$}]{ef,  }\item[{\mbox{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key}} $\ast$}]{key }\end{DoxyParamCaption})}



Sets a key to sign a file. 


\begin{DoxyParams}{Parameters}
{\em ef} & the file to set the identity. \\
\hline
{\em key} & the key handle to set as identity. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eet__Group_ggaa9142d865094701672375485d4a6284da624f64fe9803c1a4229a60214d675fa4}{EET\+\_\+\+ERROR\+\_\+\+BAD\+\_\+\+OBJECT}} if {\ttfamily ef} is invalid or \mbox{\hyperlink{group__Eet__Group_ggaa9142d865094701672375485d4a6284da2e3af24c66d0decf7c97fe4e5a7f75d4}{EET\+\_\+\+ERROR\+\_\+\+NONE}} on success.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+2.\+0 
\end{DoxySince}


References \mbox{\hyperlink{group__Eet__Group_ggaa9142d865094701672375485d4a6284da624f64fe9803c1a4229a60214d675fa4}{EET\+\_\+\+ERROR\+\_\+\+BAD\+\_\+\+OBJECT}}, and \mbox{\hyperlink{group__Eet__Group_ggaa9142d865094701672375485d4a6284da2e3af24c66d0decf7c97fe4e5a7f75d4}{EET\+\_\+\+ERROR\+\_\+\+NONE}}.

\mbox{\Hypertarget{group__Eet__Cipher__Group_ga846b1e0f0f4a1a9c7ab9a4fc55728534}\label{group__Eet__Cipher__Group_ga846b1e0f0f4a1a9c7ab9a4fc55728534}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!eet\_identity\_print@{eet\_identity\_print}}
\index{eet\_identity\_print@{eet\_identity\_print}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\doxysubsubsection{\texorpdfstring{eet\_identity\_print()}{eet\_identity\_print()}}
{\footnotesize\ttfamily EAPI void eet\+\_\+identity\+\_\+print (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key}} $\ast$}]{key,  }\item[{FILE $\ast$}]{out }\end{DoxyParamCaption})}



Displays both private and public key of an Eet\+\_\+\+Key. 


\begin{DoxyParams}{Parameters}
{\em key} & the handle to print. \\
\hline
{\em out} & where to print.\\
\hline
\end{DoxyParams}
\begin{DoxyWarning}{Warning}
You need to compile signature support in EET. 
\end{DoxyWarning}
\begin{DoxySince}{Since}
1.\+2.\+0 
\end{DoxySince}


References \mbox{\hyperlink{group__Emile__Cipher__Group_ga22b87d04488dcee57045ddc0888f4be8}{emile\+\_\+cipher\+\_\+init()}}.

\mbox{\Hypertarget{group__Eet__Cipher__Group_ga29c3b343fd972696ff5bbd7bf928fb7e}\label{group__Eet__Cipher__Group_ga29c3b343fd972696ff5bbd7bf928fb7e}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!eet\_identity\_verify@{eet\_identity\_verify}}
\index{eet\_identity\_verify@{eet\_identity\_verify}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\doxysubsubsection{\texorpdfstring{eet\_identity\_verify()}{eet\_identity\_verify()}}
{\footnotesize\ttfamily EAPI \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eet\+\_\+identity\+\_\+verify (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$}]{ef,  }\item[{const char $\ast$}]{certificate\+\_\+file }\end{DoxyParamCaption})}



Compares the identify certificate of an eet file against a stored one. 


\begin{DoxyParams}{Parameters}
{\em ef} & The file handle to check the identify of \\
\hline
{\em certificate\+\_\+file} & The path to the certificate file \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily EINA\+\_\+\+TRUE} if the certificates match, otherwise {\ttfamily EINA\+\_\+\+FALSE} 
\end{DoxyReturn}
The {\ttfamily ef} file handle mus be valid, and a signed file, otherwise checking will fail. The path to the certificate file must be a valid file path to a \textquotesingle{}pem\textquotesingle{} format file (the same used for siging with \mbox{\hyperlink{group__Eet__Cipher__Group_ga0bedcc0ed03bcf6f09002cc888c755e2}{eet\+\_\+identity\+\_\+open()}} as a certificate file).

\begin{DoxyNote}{Note}
This function can not be used to provide any security mechanism. You need to check your x509 certificate against a chain of trust to have a proper security. This is just a convenience test function. 
\end{DoxyNote}
\begin{DoxyWarning}{Warning}
You need to compile signature support in EET. 
\end{DoxyWarning}
\begin{DoxySince}{Since}
1.\+13 
\end{DoxySince}


References \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}, and \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}.

\mbox{\Hypertarget{group__Eet__Cipher__Group_ga0350f0b19bc28dfcda60db1675f2512e}\label{group__Eet__Cipher__Group_ga0350f0b19bc28dfcda60db1675f2512e}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!eet\_identity\_x509@{eet\_identity\_x509}}
\index{eet\_identity\_x509@{eet\_identity\_x509}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\doxysubsubsection{\texorpdfstring{eet\_identity\_x509()}{eet\_identity\_x509()}}
{\footnotesize\ttfamily EAPI const void $\ast$ eet\+\_\+identity\+\_\+x509 (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$}]{ef,  }\item[{int $\ast$}]{der\+\_\+length }\end{DoxyParamCaption})}



Gets the x509 der certificate associated with an Eet\+\_\+\+File. 

Will return NULL if the file is not signed.


\begin{DoxyParams}{Parameters}
{\em ef} & The file handle to query. \\
\hline
{\em der\+\_\+length} & The length of returned data, may be {\ttfamily NULL}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the x509 certificate or {\ttfamily NULL} on error.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+2.\+0 
\end{DoxySince}
\mbox{\Hypertarget{group__Eet__Cipher__Group_ga67da122d9baa4a08af5850eae06ef906}\label{group__Eet__Cipher__Group_ga67da122d9baa4a08af5850eae06ef906}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!eet\_identity\_signature@{eet\_identity\_signature}}
\index{eet\_identity\_signature@{eet\_identity\_signature}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\doxysubsubsection{\texorpdfstring{eet\_identity\_signature()}{eet\_identity\_signature()}}
{\footnotesize\ttfamily EAPI const void $\ast$ eet\+\_\+identity\+\_\+signature (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$}]{ef,  }\item[{int $\ast$}]{signature\+\_\+length }\end{DoxyParamCaption})}



Gets the raw signature associated with an Eet\+\_\+\+File. 

Will return NULL if the file is not signed.


\begin{DoxyParams}{Parameters}
{\em ef} & The file handle to query. \\
\hline
{\em signature\+\_\+length} & The length of returned data, may be {\ttfamily NULL}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The raw signature or {\ttfamily NULL} on error. 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eet__Cipher__Group_ga09d377eb82eb99003564d9005dea4c9e}\label{group__Eet__Cipher__Group_ga09d377eb82eb99003564d9005dea4c9e}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!eet\_identity\_sha1@{eet\_identity\_sha1}}
\index{eet\_identity\_sha1@{eet\_identity\_sha1}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\doxysubsubsection{\texorpdfstring{eet\_identity\_sha1()}{eet\_identity\_sha1()}}
{\footnotesize\ttfamily EAPI const void $\ast$ eet\+\_\+identity\+\_\+sha1 (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$}]{ef,  }\item[{int $\ast$}]{sha1\+\_\+length }\end{DoxyParamCaption})}



Gets the SHA1 associated with a file. 

Could be the one used to sign the data or if the data where not signed, it will be the SHA1 of the file.


\begin{DoxyParams}{Parameters}
{\em ef} & The file handle to query. \\
\hline
{\em sha1\+\_\+length} & The length of returned data, may be {\ttfamily NULL}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the associated SHA1 or {\ttfamily NULL} on error.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+2.\+0 
\end{DoxySince}
\mbox{\Hypertarget{group__Eet__Cipher__Group_ga131e4a43a0ae98dc31a9a642ada33357}\label{group__Eet__Cipher__Group_ga131e4a43a0ae98dc31a9a642ada33357}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!eet\_identity\_certificate\_print@{eet\_identity\_certificate\_print}}
\index{eet\_identity\_certificate\_print@{eet\_identity\_certificate\_print}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\doxysubsubsection{\texorpdfstring{eet\_identity\_certificate\_print()}{eet\_identity\_certificate\_print()}}
{\footnotesize\ttfamily EAPI void eet\+\_\+identity\+\_\+certificate\+\_\+print (\begin{DoxyParamCaption}\item[{const unsigned char $\ast$}]{certificate,  }\item[{int}]{der\+\_\+length,  }\item[{FILE $\ast$}]{out }\end{DoxyParamCaption})}



Displays the x509 der certificate to out. 


\begin{DoxyParams}{Parameters}
{\em certificate} & the x509 certificate to print \\
\hline
{\em der\+\_\+length} & The length the certificate. \\
\hline
{\em out} & where to print.\\
\hline
\end{DoxyParams}
\begin{DoxyWarning}{Warning}
You need to compile signature support in EET. 
\end{DoxyWarning}
\begin{DoxySince}{Since}
1.\+2.\+0 
\end{DoxySince}


References \mbox{\hyperlink{eina__alloca_8h_ae13861224cb6597c3171a910683cb5fc}{alloca()}}, and \mbox{\hyperlink{group__Emile__Cipher__Group_ga22b87d04488dcee57045ddc0888f4be8}{emile\+\_\+cipher\+\_\+init()}}.

