\doxysubsubsection{Eet Data Serialization using A Ciphers}
\hypertarget{group__Eet__Data__Cipher__Group}{}\label{group__Eet__Data__Cipher__Group}\index{Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}}
\doxysubsubsubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
EAPI void \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eet__Data__Cipher__Group_gae9ce74bcfb4be47d2bb8c7e87090812f}{eet\+\_\+data\+\_\+read\+\_\+cipher}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} \texorpdfstring{$\ast$}{*}ef, \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor}} \texorpdfstring{$\ast$}{*}edd, const char \texorpdfstring{$\ast$}{*}name, const char \texorpdfstring{$\ast$}{*}cipher\+\_\+key)
\begin{DoxyCompactList}\small\item\em Reads a data structure from an eet file and decodes it using a cipher. \end{DoxyCompactList}\item 
EAPI void \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eet__Data__Cipher__Group_gae20c746ed8ccd528388423d795fcb37f}{eet\+\_\+data\+\_\+read\+\_\+cipher\+\_\+buffer}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} \texorpdfstring{$\ast$}{*}ef, \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor}} \texorpdfstring{$\ast$}{*}edd, const char \texorpdfstring{$\ast$}{*}name, const char \texorpdfstring{$\ast$}{*}cipher\+\_\+key, char \texorpdfstring{$\ast$}{*}buffer, int buffer\+\_\+size)
\begin{DoxyCompactList}\small\item\em Reads a data structure from an eet file and decodes it into a buffer using a cipher. \end{DoxyCompactList}\item 
EAPI void \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eet__Data__Cipher__Group_gaea292fec23a53c0c1e248914c7fe9860}{eet\+\_\+data\+\_\+xattr\+\_\+cipher\+\_\+get}} (const char \texorpdfstring{$\ast$}{*}filename, const char \texorpdfstring{$\ast$}{*}attribute, \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor}} \texorpdfstring{$\ast$}{*}edd, const char \texorpdfstring{$\ast$}{*}cipher\+\_\+key)
\begin{DoxyCompactList}\small\item\em Reads a data structure from an eet extended attribute and decodes it using a cipher. \end{DoxyCompactList}\item 
EAPI int \mbox{\hyperlink{group__Eet__Data__Cipher__Group_ga9e46230c55006296f141ed9a5807c759}{eet\+\_\+data\+\_\+write\+\_\+cipher}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} \texorpdfstring{$\ast$}{*}ef, \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor}} \texorpdfstring{$\ast$}{*}edd, const char \texorpdfstring{$\ast$}{*}name, const char \texorpdfstring{$\ast$}{*}cipher\+\_\+key, const void \texorpdfstring{$\ast$}{*}data, int compress)
\begin{DoxyCompactList}\small\item\em Writes a data structure from memory and store in an eet file using a cipher. \end{DoxyCompactList}\item 
EAPI \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eet__Data__Cipher__Group_ga4aae479401e75a035a4d1e9185223546}{eet\+\_\+data\+\_\+xattr\+\_\+cipher\+\_\+set}} (const char \texorpdfstring{$\ast$}{*}filename, const char \texorpdfstring{$\ast$}{*}attribute, \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor}} \texorpdfstring{$\ast$}{*}edd, const char \texorpdfstring{$\ast$}{*}cipher\+\_\+key, const void \texorpdfstring{$\ast$}{*}data, \mbox{\hyperlink{group__Eina__Xattr__Group_ga016f6b7c97a22104a6ba6d1b042548c8}{Eina\+\_\+\+Xattr\+\_\+\+Flags}} flags)
\begin{DoxyCompactList}\small\item\em Writes a data structure from memory and store in an eet extended attribute using a cipher. \end{DoxyCompactList}\item 
EAPI int \mbox{\hyperlink{group__Eet__Data__Cipher__Group_gac85bb8a9b46804288bb5e37caf21fd1c}{eet\+\_\+data\+\_\+text\+\_\+dump\+\_\+cipher}} (const void \texorpdfstring{$\ast$}{*}data\+\_\+in, const char \texorpdfstring{$\ast$}{*}cipher\+\_\+key, int size\+\_\+in, Eet\+\_\+\+Dump\+\_\+\+Callback dumpfunc, void \texorpdfstring{$\ast$}{*}dumpdata)
\begin{DoxyCompactList}\small\item\em Dumps an eet encoded data structure into ascii text using a cipher. \end{DoxyCompactList}\item 
EAPI void \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eet__Data__Cipher__Group_gae5d6e333a712e2ae0d85cca05e7bf9fe}{eet\+\_\+data\+\_\+text\+\_\+undump\+\_\+cipher}} (const char \texorpdfstring{$\ast$}{*}text, const char \texorpdfstring{$\ast$}{*}cipher\+\_\+key, int textlen, int \texorpdfstring{$\ast$}{*}size\+\_\+ret)
\begin{DoxyCompactList}\small\item\em Takes an ascii encoding from \doxylink{group__Eet__Data__Group_ga4160a247c086955b4734af896b6fd270}{eet\+\_\+data\+\_\+text\+\_\+dump()} and re-\/encode in binary using a cipher. \end{DoxyCompactList}\item 
EAPI int \mbox{\hyperlink{group__Eet__Data__Cipher__Group_ga5f80e7c90720422ee595f229fd8fcbef}{eet\+\_\+data\+\_\+dump\+\_\+cipher}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} \texorpdfstring{$\ast$}{*}ef, const char \texorpdfstring{$\ast$}{*}name, const char \texorpdfstring{$\ast$}{*}cipher\+\_\+key, Eet\+\_\+\+Dump\+\_\+\+Callback dumpfunc, void \texorpdfstring{$\ast$}{*}dumpdata)
\begin{DoxyCompactList}\small\item\em Dumps an eet encoded data structure from an eet file into ascii text using a cipher. \end{DoxyCompactList}\item 
EAPI int \mbox{\hyperlink{group__Eet__Data__Cipher__Group_ga58060eca71513b8634a32e076dc8dd85}{eet\+\_\+data\+\_\+undump\+\_\+cipher}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} \texorpdfstring{$\ast$}{*}ef, const char \texorpdfstring{$\ast$}{*}name, const char \texorpdfstring{$\ast$}{*}cipher\+\_\+key, const char \texorpdfstring{$\ast$}{*}text, int textlen, int compress)
\begin{DoxyCompactList}\small\item\em Takes an ascii encoding from \doxylink{group__Eet__Data__Group_ga33b90cc41fe0e6fffc6b4fb0c8c62a99}{eet\+\_\+data\+\_\+dump()} and re-\/encode in binary using a cipher. \end{DoxyCompactList}\item 
EAPI void \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eet__Data__Cipher__Group_ga29effd25b5a1b587e9e72289e23df01d}{eet\+\_\+data\+\_\+descriptor\+\_\+decode\+\_\+cipher}} (\mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor}} \texorpdfstring{$\ast$}{*}edd, const void \texorpdfstring{$\ast$}{*}data\+\_\+in, const char \texorpdfstring{$\ast$}{*}cipher\+\_\+key, int size\+\_\+in)
\begin{DoxyCompactList}\small\item\em Decodes a data structure from an arbitrary location in memory using a cipher. \end{DoxyCompactList}\item 
EAPI void \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eet__Data__Cipher__Group_gac31bca0d53d723a7fcb6b38135f348b7}{eet\+\_\+data\+\_\+descriptor\+\_\+encode\+\_\+cipher}} (\mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor}} \texorpdfstring{$\ast$}{*}edd, const void \texorpdfstring{$\ast$}{*}data\+\_\+in, const char \texorpdfstring{$\ast$}{*}cipher\+\_\+key, int \texorpdfstring{$\ast$}{*}size\+\_\+ret)
\begin{DoxyCompactList}\small\item\em Encodes a data struct to memory and return that encoded data using a cipher. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsubsubsection{Detailed Description}


Most of the \doxylink{group__Eet__Data__Group}{Eet Data Serialization} have alternative versions that accounts for ciphers to protect their content.

\begin{DoxySeeAlso}{See also}
\doxylink{group__Eet__Cipher__Group}{Cipher, Identity and Protection Mechanisms} 
\end{DoxySeeAlso}


\doxysubsubsubsection{Function Documentation}
\Hypertarget{group__Eet__Data__Cipher__Group_gae9ce74bcfb4be47d2bb8c7e87090812f}\label{group__Eet__Data__Cipher__Group_gae9ce74bcfb4be47d2bb8c7e87090812f} 
\index{Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}!eet\_data\_read\_cipher@{eet\_data\_read\_cipher}}
\index{eet\_data\_read\_cipher@{eet\_data\_read\_cipher}!Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}}
\doxysubsubsubsubsection{\texorpdfstring{eet\_data\_read\_cipher()}{eet\_data\_read\_cipher()}}
{\footnotesize\ttfamily EAPI void \texorpdfstring{$\ast$}{*} eet\+\_\+data\+\_\+read\+\_\+cipher (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} \texorpdfstring{$\ast$}{*}}]{ef,  }\item[{\mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor}} \texorpdfstring{$\ast$}{*}}]{edd,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{name,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{cipher\+\_\+key }\end{DoxyParamCaption})}



Reads a data structure from an eet file and decodes it using a cipher. 


\begin{DoxyParams}{Parameters}
{\em ef} & The eet file handle to read from. \\
\hline
{\em edd} & The data descriptor handle to use when decoding. \\
\hline
{\em name} & The key the data is stored under in the eet file. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to the decoded data structure.
\end{DoxyReturn}
This function decodes a data structure stored in an eet file, returning a pointer to it if it decoded successfully, or NULL on failure. This can save a programmer dozens of hours of work in writing configuration file parsing and writing code, as eet does all that work for the program and presents a program-\/friendly data structure, just as the programmer likes. Eet can handle members being added or deleted from the data in storage and safely zero-\/fills unfilled members if they were not found in the data. It checks sizes and headers whenever it reads data, allowing the programmer to not worry about corrupt data.

Once a data structure has been described by the programmer with the fields they wish to save or load, storing or retrieving a data structure from an eet file, or from a chunk of memory is as simple as a single function call.

\begin{DoxySeeAlso}{See also}
\doxylink{group__Eet__Data__Group_ga4c09f4dfb051baabc0c0551ea98b6830}{eet\+\_\+data\+\_\+read()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


References \mbox{\hyperlink{group__Eet__File__Group_gabac3fef94bb732840b9ac9cc2917c4c6}{eet\+\_\+dictionary\+\_\+get()}}, \mbox{\hyperlink{group__Eet__File__Cipher__Group_gac6d14b588c7e192dc621f466749f3177}{eet\+\_\+read\+\_\+cipher()}}, \mbox{\hyperlink{group__Eet__File__Group_ga250ac882b4530dc8112b0c9517a5b44d}{eet\+\_\+read\+\_\+direct()}}, and \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}.



Referenced by \mbox{\hyperlink{group__Eet__Data__Group_ga4c09f4dfb051baabc0c0551ea98b6830}{eet\+\_\+data\+\_\+read()}}.

\Hypertarget{group__Eet__Data__Cipher__Group_gae20c746ed8ccd528388423d795fcb37f}\label{group__Eet__Data__Cipher__Group_gae20c746ed8ccd528388423d795fcb37f} 
\index{Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}!eet\_data\_read\_cipher\_buffer@{eet\_data\_read\_cipher\_buffer}}
\index{eet\_data\_read\_cipher\_buffer@{eet\_data\_read\_cipher\_buffer}!Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}}
\doxysubsubsubsubsection{\texorpdfstring{eet\_data\_read\_cipher\_buffer()}{eet\_data\_read\_cipher\_buffer()}}
{\footnotesize\ttfamily EAPI void \texorpdfstring{$\ast$}{*} eet\+\_\+data\+\_\+read\+\_\+cipher\+\_\+buffer (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} \texorpdfstring{$\ast$}{*}}]{ef,  }\item[{\mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor}} \texorpdfstring{$\ast$}{*}}]{edd,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{name,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{cipher\+\_\+key,  }\item[{char \texorpdfstring{$\ast$}{*}}]{buffer,  }\item[{int}]{buffer\+\_\+size }\end{DoxyParamCaption})}



Reads a data structure from an eet file and decodes it into a buffer using a cipher. 


\begin{DoxyParams}{Parameters}
{\em ef} & The eet file handle to read from. \\
\hline
{\em edd} & The data descriptor handle to use when decoding. \\
\hline
{\em name} & The key the data is stored under in the eet file. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
{\em buffer} & Buffer. \\
\hline
{\em buffer\+\_\+size} & The buffer size. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to buffer if successful, and NULL on error.
\end{DoxyReturn}
This function decodes a data structure stored in an eet file, returning a pointer to it if it decoded successfully, or NULL on failure. This can save a programmer dozens of hours of work in writing configuration file parsing and writing code, as eet does all that work for the program and presents a program-\/friendly data structure, just as the programmer likes. Eet can handle members being added or deleted from the data in storage and safely zero-\/fills unfilled members if they were not found in the data. It checks sizes and headers whenever it reads data, allowing the programmer to not worry about corrupt data.

Once a data structure has been described by the programmer with the fields they wish to save or load, storing or retrieving a data structure from an eet file, or from a chunk of memory is as simple as a single function call.

\begin{DoxySeeAlso}{See also}
\doxylink{group__Eet__Data__Cipher__Group_gae9ce74bcfb4be47d2bb8c7e87090812f}{eet\+\_\+data\+\_\+read\+\_\+cipher()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+10.\+0 
\end{DoxySince}


References \mbox{\hyperlink{group__Eet__File__Group_gabac3fef94bb732840b9ac9cc2917c4c6}{eet\+\_\+dictionary\+\_\+get()}}, \mbox{\hyperlink{group__Eet__File__Cipher__Group_gac6d14b588c7e192dc621f466749f3177}{eet\+\_\+read\+\_\+cipher()}}, \mbox{\hyperlink{group__Eet__File__Group_ga250ac882b4530dc8112b0c9517a5b44d}{eet\+\_\+read\+\_\+direct()}}, and \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}.

\Hypertarget{group__Eet__Data__Cipher__Group_gaea292fec23a53c0c1e248914c7fe9860}\label{group__Eet__Data__Cipher__Group_gaea292fec23a53c0c1e248914c7fe9860} 
\index{Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}!eet\_data\_xattr\_cipher\_get@{eet\_data\_xattr\_cipher\_get}}
\index{eet\_data\_xattr\_cipher\_get@{eet\_data\_xattr\_cipher\_get}!Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}}
\doxysubsubsubsubsection{\texorpdfstring{eet\_data\_xattr\_cipher\_get()}{eet\_data\_xattr\_cipher\_get()}}
{\footnotesize\ttfamily EAPI void \texorpdfstring{$\ast$}{*} eet\+\_\+data\+\_\+xattr\+\_\+cipher\+\_\+get (\begin{DoxyParamCaption}\item[{const char \texorpdfstring{$\ast$}{*}}]{filename,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{attribute,  }\item[{\mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor}} \texorpdfstring{$\ast$}{*}}]{edd,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{cipher\+\_\+key }\end{DoxyParamCaption})}



Reads a data structure from an eet extended attribute and decodes it using a cipher. 


\begin{DoxyParams}{Parameters}
{\em filename} & The file to extract the extended attribute from. \\
\hline
{\em attribute} & The attribute to get the data from. \\
\hline
{\em edd} & The data descriptor handle to use when decoding. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to the decoded data structure.
\end{DoxyReturn}
This function decodes a data structure stored in an eet extended attribute, returning a pointer to it if it decoded successfully, or NULL on failure. Eet can handle members being added or deleted from the data in storage and safely zero-\/fills unfilled members if they were not found in the data. It checks sizes and headers whenever it reads data, allowing the programmer to not worry about corrupt data.

Once a data structure has been described by the programmer with the fields they wish to save or load, storing or retrieving a data structure from an eet file, from a chunk of memory or from an extended attribute is as simple as a single function call.

\begin{DoxySince}{Since}
1.\+5.\+0 
\end{DoxySince}


References \mbox{\hyperlink{group__Eet__Data__Cipher__Group_ga29effd25b5a1b587e9e72289e23df01d}{eet\+\_\+data\+\_\+descriptor\+\_\+decode\+\_\+cipher()}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}, and \mbox{\hyperlink{group__Eina__Xattr__Group_gac6ce4d4f37402ed50c8c5a97e470ee8f}{eina\+\_\+xattr\+\_\+get()}}.

\Hypertarget{group__Eet__Data__Cipher__Group_ga9e46230c55006296f141ed9a5807c759}\label{group__Eet__Data__Cipher__Group_ga9e46230c55006296f141ed9a5807c759} 
\index{Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}!eet\_data\_write\_cipher@{eet\_data\_write\_cipher}}
\index{eet\_data\_write\_cipher@{eet\_data\_write\_cipher}!Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}}
\doxysubsubsubsubsection{\texorpdfstring{eet\_data\_write\_cipher()}{eet\_data\_write\_cipher()}}
{\footnotesize\ttfamily EAPI int eet\+\_\+data\+\_\+write\+\_\+cipher (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} \texorpdfstring{$\ast$}{*}}]{ef,  }\item[{\mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor}} \texorpdfstring{$\ast$}{*}}]{edd,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{name,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{cipher\+\_\+key,  }\item[{const void \texorpdfstring{$\ast$}{*}}]{data,  }\item[{int}]{compress }\end{DoxyParamCaption})}



Writes a data structure from memory and store in an eet file using a cipher. 


\begin{DoxyParams}{Parameters}
{\em ef} & The eet file handle to write to. \\
\hline
{\em edd} & The data descriptor to use when encoding. \\
\hline
{\em name} & The key to store the data under in the eet file. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
{\em data} & A pointer to the data structure to save and encode. \\
\hline
{\em compress} & Compression flags for storage. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
bytes written on successful write, 0 on failure.
\end{DoxyReturn}
This function is the reverse of \doxylink{group__Eet__Data__Cipher__Group_gae9ce74bcfb4be47d2bb8c7e87090812f}{eet\+\_\+data\+\_\+read\+\_\+cipher()}, saving a data structure to an eet file.

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


References \mbox{\hyperlink{group__Eet__File__Group_gabac3fef94bb732840b9ac9cc2917c4c6}{eet\+\_\+dictionary\+\_\+get()}}, \mbox{\hyperlink{group__Eet__File__Cipher__Group_ga0c08a5881d6fd3474a8cbe03a445aff3}{eet\+\_\+write\+\_\+cipher()}}, and \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}.



Referenced by \mbox{\hyperlink{group__Eet__Data__Group_gac66d1c49e3490bc5d803982d833ff8aa}{eet\+\_\+data\+\_\+write()}}.

\Hypertarget{group__Eet__Data__Cipher__Group_ga4aae479401e75a035a4d1e9185223546}\label{group__Eet__Data__Cipher__Group_ga4aae479401e75a035a4d1e9185223546} 
\index{Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}!eet\_data\_xattr\_cipher\_set@{eet\_data\_xattr\_cipher\_set}}
\index{eet\_data\_xattr\_cipher\_set@{eet\_data\_xattr\_cipher\_set}!Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}}
\doxysubsubsubsubsection{\texorpdfstring{eet\_data\_xattr\_cipher\_set()}{eet\_data\_xattr\_cipher\_set()}}
{\footnotesize\ttfamily EAPI \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eet\+\_\+data\+\_\+xattr\+\_\+cipher\+\_\+set (\begin{DoxyParamCaption}\item[{const char \texorpdfstring{$\ast$}{*}}]{filename,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{attribute,  }\item[{\mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor}} \texorpdfstring{$\ast$}{*}}]{edd,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{cipher\+\_\+key,  }\item[{const void \texorpdfstring{$\ast$}{*}}]{data,  }\item[{\mbox{\hyperlink{group__Eina__Xattr__Group_ga016f6b7c97a22104a6ba6d1b042548c8}{Eina\+\_\+\+Xattr\+\_\+\+Flags}}}]{flags }\end{DoxyParamCaption})}



Writes a data structure from memory and store in an eet extended attribute using a cipher. 


\begin{DoxyParams}{Parameters}
{\em filename} & The file to write the extended attribute to. \\
\hline
{\em attribute} & The attribute to store the data to. \\
\hline
{\em edd} & The data descriptor to use when encoding. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
{\em data} & A pointer to the data structure to save and encode. \\
\hline
{\em flags} & The policy to use when setting the data. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
EINA\+\_\+\+TRUE on success, EINA\+\_\+\+FALSE on failure.
\end{DoxyReturn}
This function is the reverse of \doxylink{group__Eet__Data__Cipher__Group_gaea292fec23a53c0c1e248914c7fe9860}{eet\+\_\+data\+\_\+xattr\+\_\+cipher\+\_\+get()}, saving a data structure to an eet extended attribute.

\begin{DoxySince}{Since}
1.\+5.\+0 
\end{DoxySince}


References \mbox{\hyperlink{group__Eet__Data__Cipher__Group_gac31bca0d53d723a7fcb6b38135f348b7}{eet\+\_\+data\+\_\+descriptor\+\_\+encode\+\_\+cipher()}}, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}, and \mbox{\hyperlink{group__Eina__Xattr__Group_ga2fb838e20125d6ccbb55820408dfae9b}{eina\+\_\+xattr\+\_\+set()}}.

\Hypertarget{group__Eet__Data__Cipher__Group_gac85bb8a9b46804288bb5e37caf21fd1c}\label{group__Eet__Data__Cipher__Group_gac85bb8a9b46804288bb5e37caf21fd1c} 
\index{Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}!eet\_data\_text\_dump\_cipher@{eet\_data\_text\_dump\_cipher}}
\index{eet\_data\_text\_dump\_cipher@{eet\_data\_text\_dump\_cipher}!Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}}
\doxysubsubsubsubsection{\texorpdfstring{eet\_data\_text\_dump\_cipher()}{eet\_data\_text\_dump\_cipher()}}
{\footnotesize\ttfamily EAPI int eet\+\_\+data\+\_\+text\+\_\+dump\+\_\+cipher (\begin{DoxyParamCaption}\item[{const void \texorpdfstring{$\ast$}{*}}]{data\+\_\+in,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{cipher\+\_\+key,  }\item[{int}]{size\+\_\+in,  }\item[{Eet\+\_\+\+Dump\+\_\+\+Callback}]{dumpfunc,  }\item[{void \texorpdfstring{$\ast$}{*}}]{dumpdata }\end{DoxyParamCaption})}



Dumps an eet encoded data structure into ascii text using a cipher. 


\begin{DoxyParams}{Parameters}
{\em data\+\_\+in} & The pointer to the data to decode into a struct. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
{\em size\+\_\+in} & The size of the data pointed to in bytes. \\
\hline
{\em dumpfunc} & The function to call passed a string when new data is converted to text \\
\hline
{\em dumpdata} & The data to pass to the {\ttfamily dumpfunc} callback. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily 1} on success, {\ttfamily 0} on failure
\end{DoxyReturn}
This function will take a chunk of data encoded by \doxylink{group__Eet__Data__Group_gac9b29a0c31eabcfb0e660946cdd49dc5}{eet\+\_\+data\+\_\+descriptor\+\_\+encode()} and convert it into human readable ascii text. It does this by calling the {\ttfamily dumpfunc} callback for all new text that is generated. This callback should append to any existing text buffer and will be passed the pointer {\ttfamily dumpdata} as a parameter as well as a string with new text to be appended.

Example\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordtype}{void}\ output(\textcolor{keywordtype}{void}\ *data,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\textcolor{keywordtype}{string})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ printf(\textcolor{stringliteral}{"{}\%s"{}},\ \textcolor{keywordtype}{string});}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void}\ dump(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *file)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ FILE\ *f;}
\DoxyCodeLine{\ \ \textcolor{keywordtype}{int}\ len;}
\DoxyCodeLine{\ \ \textcolor{keywordtype}{void}\ *data;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ f\ =\ fopen(file,\ \textcolor{stringliteral}{"{}rb"{}});}
\DoxyCodeLine{\ \ fseek(f,\ 0,\ SEEK\_END);}
\DoxyCodeLine{\ \ len\ =\ ftell(f);}
\DoxyCodeLine{\ \ rewind(f);}
\DoxyCodeLine{\ \ data\ =\ malloc(len);}
\DoxyCodeLine{\ \ fread(data,\ len,\ 1,\ f);}
\DoxyCodeLine{\ \ fclose(f);}
\DoxyCodeLine{\ \ \mbox{\hyperlink{group__Eet__Data__Cipher__Group_gac85bb8a9b46804288bb5e37caf21fd1c}{eet\_data\_text\_dump\_cipher}}(data,\ cipher\_key,\ len,\ output,\ NULL);}
\DoxyCodeLine{\}}

\end{DoxyCode}


\begin{DoxySeeAlso}{See also}
\doxylink{group__Eet__Data__Group_ga4160a247c086955b4734af896b6fd270}{eet\+\_\+data\+\_\+text\+\_\+dump()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


References \mbox{\hyperlink{group__Eet__Node__Group_ga3700cb12a7641f5219ce4b775937f207}{eet\+\_\+node\+\_\+del()}}, and \mbox{\hyperlink{group__Eet__Node__Group_gaee8ca9757bf5fc55dadc90fa6590af6e}{eet\+\_\+node\+\_\+dump()}}.



Referenced by \mbox{\hyperlink{group__Eet__Data__Group_ga4160a247c086955b4734af896b6fd270}{eet\+\_\+data\+\_\+text\+\_\+dump()}}.

\Hypertarget{group__Eet__Data__Cipher__Group_gae5d6e333a712e2ae0d85cca05e7bf9fe}\label{group__Eet__Data__Cipher__Group_gae5d6e333a712e2ae0d85cca05e7bf9fe} 
\index{Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}!eet\_data\_text\_undump\_cipher@{eet\_data\_text\_undump\_cipher}}
\index{eet\_data\_text\_undump\_cipher@{eet\_data\_text\_undump\_cipher}!Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}}
\doxysubsubsubsubsection{\texorpdfstring{eet\_data\_text\_undump\_cipher()}{eet\_data\_text\_undump\_cipher()}}
{\footnotesize\ttfamily EAPI void \texorpdfstring{$\ast$}{*} eet\+\_\+data\+\_\+text\+\_\+undump\+\_\+cipher (\begin{DoxyParamCaption}\item[{const char \texorpdfstring{$\ast$}{*}}]{text,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{cipher\+\_\+key,  }\item[{int}]{textlen,  }\item[{int \texorpdfstring{$\ast$}{*}}]{size\+\_\+ret }\end{DoxyParamCaption})}



Takes an ascii encoding from \doxylink{group__Eet__Data__Group_ga4160a247c086955b4734af896b6fd270}{eet\+\_\+data\+\_\+text\+\_\+dump()} and re-\/encode in binary using a cipher. 


\begin{DoxyParams}{Parameters}
{\em text} & The pointer to the string data to parse and encode. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
{\em textlen} & The size of the string in bytes (not including 0 byte terminator). \\
\hline
{\em size\+\_\+ret} & This gets filled in with the encoded data blob size in bytes. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The encoded data on success, NULL on failure.
\end{DoxyReturn}
This function will parse the string pointed to by {\ttfamily text} and return an encoded data lump the same way \doxylink{group__Eet__Data__Group_gac9b29a0c31eabcfb0e660946cdd49dc5}{eet\+\_\+data\+\_\+descriptor\+\_\+encode()} takes an in-\/memory data struct and encodes into a binary blob. {\ttfamily text} is a normal C string.

\begin{DoxySeeAlso}{See also}
\doxylink{group__Eet__Data__Group_gad9bc93de70df6130fad97f6f967212a5}{eet\+\_\+data\+\_\+text\+\_\+undump()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


Referenced by \mbox{\hyperlink{group__Eet__Data__Group_gad9bc93de70df6130fad97f6f967212a5}{eet\+\_\+data\+\_\+text\+\_\+undump()}}.

\Hypertarget{group__Eet__Data__Cipher__Group_ga5f80e7c90720422ee595f229fd8fcbef}\label{group__Eet__Data__Cipher__Group_ga5f80e7c90720422ee595f229fd8fcbef} 
\index{Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}!eet\_data\_dump\_cipher@{eet\_data\_dump\_cipher}}
\index{eet\_data\_dump\_cipher@{eet\_data\_dump\_cipher}!Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}}
\doxysubsubsubsubsection{\texorpdfstring{eet\_data\_dump\_cipher()}{eet\_data\_dump\_cipher()}}
{\footnotesize\ttfamily EAPI int eet\+\_\+data\+\_\+dump\+\_\+cipher (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} \texorpdfstring{$\ast$}{*}}]{ef,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{name,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{cipher\+\_\+key,  }\item[{Eet\+\_\+\+Dump\+\_\+\+Callback}]{dumpfunc,  }\item[{void \texorpdfstring{$\ast$}{*}}]{dumpdata }\end{DoxyParamCaption})}



Dumps an eet encoded data structure from an eet file into ascii text using a cipher. 


\begin{DoxyParams}{Parameters}
{\em ef} & A valid eet file handle. \\
\hline
{\em name} & Name of the entry. eg\+: "{}/base/file\+\_\+i\+\_\+want"{}. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
{\em dumpfunc} & The function to call passed a string when new data is converted to text \\
\hline
{\em dumpdata} & The data to pass to the {\ttfamily dumpfunc} callback. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily 1} on success, {\ttfamily 0} on failure
\end{DoxyReturn}
This function will take an open and valid eet file from \doxylink{group__Eet__File__Group_ga675160a758832ee812edf7f64ed30ee6}{eet\+\_\+open()} request the data encoded by \doxylink{group__Eet__Data__Group_gac9b29a0c31eabcfb0e660946cdd49dc5}{eet\+\_\+data\+\_\+descriptor\+\_\+encode()} corresponding to the key {\ttfamily name} and convert it into human readable ascii text. It does this by calling the {\ttfamily dumpfunc} callback for all new text that is generated. This callback should append to any existing text buffer and will be passed the pointer {\ttfamily dumpdata} as a parameter as well as a string with new text to be appended.

\begin{DoxySeeAlso}{See also}
\doxylink{group__Eet__Data__Group_ga33b90cc41fe0e6fffc6b4fb0c8c62a99}{eet\+\_\+data\+\_\+dump()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


References \mbox{\hyperlink{group__Eet__File__Group_gabac3fef94bb732840b9ac9cc2917c4c6}{eet\+\_\+dictionary\+\_\+get()}}, \mbox{\hyperlink{group__Eet__Node__Group_ga3700cb12a7641f5219ce4b775937f207}{eet\+\_\+node\+\_\+del()}}, \mbox{\hyperlink{group__Eet__Node__Group_gaee8ca9757bf5fc55dadc90fa6590af6e}{eet\+\_\+node\+\_\+dump()}}, \mbox{\hyperlink{group__Eet__File__Cipher__Group_gac6d14b588c7e192dc621f466749f3177}{eet\+\_\+read\+\_\+cipher()}}, and \mbox{\hyperlink{group__Eet__File__Group_ga250ac882b4530dc8112b0c9517a5b44d}{eet\+\_\+read\+\_\+direct()}}.



Referenced by \mbox{\hyperlink{group__Eet__Data__Group_ga33b90cc41fe0e6fffc6b4fb0c8c62a99}{eet\+\_\+data\+\_\+dump()}}.

\Hypertarget{group__Eet__Data__Cipher__Group_ga58060eca71513b8634a32e076dc8dd85}\label{group__Eet__Data__Cipher__Group_ga58060eca71513b8634a32e076dc8dd85} 
\index{Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}!eet\_data\_undump\_cipher@{eet\_data\_undump\_cipher}}
\index{eet\_data\_undump\_cipher@{eet\_data\_undump\_cipher}!Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}}
\doxysubsubsubsubsection{\texorpdfstring{eet\_data\_undump\_cipher()}{eet\_data\_undump\_cipher()}}
{\footnotesize\ttfamily EAPI int eet\+\_\+data\+\_\+undump\+\_\+cipher (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} \texorpdfstring{$\ast$}{*}}]{ef,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{name,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{cipher\+\_\+key,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{text,  }\item[{int}]{textlen,  }\item[{int}]{compress }\end{DoxyParamCaption})}



Takes an ascii encoding from \doxylink{group__Eet__Data__Group_ga33b90cc41fe0e6fffc6b4fb0c8c62a99}{eet\+\_\+data\+\_\+dump()} and re-\/encode in binary using a cipher. 


\begin{DoxyParams}{Parameters}
{\em ef} & A valid eet file handle. \\
\hline
{\em name} & Name of the entry. eg\+: "{}/base/file\+\_\+i\+\_\+want"{}. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
{\em text} & The pointer to the string data to parse and encode. \\
\hline
{\em textlen} & The size of the string in bytes (not including 0 byte terminator). \\
\hline
{\em compress} & Compression flags (1 == compress, 0 = don\textquotesingle{}t compress). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily 1} on success, {\ttfamily 0} on failure
\end{DoxyReturn}
This function will parse the string pointed to by {\ttfamily text}, encode it the same way \doxylink{group__Eet__Data__Group_gac9b29a0c31eabcfb0e660946cdd49dc5}{eet\+\_\+data\+\_\+descriptor\+\_\+encode()} takes an in-\/memory data struct and encodes into a binary blob.

The data (optionally compressed) will be in ram, pending a flush to disk (it will stay in ram till the eet file handle is closed though).

\begin{DoxySeeAlso}{See also}
\doxylink{group__Eet__Data__Group_gafb1d3207c31e349ed184645e21aa838d}{eet\+\_\+data\+\_\+undump()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


References \mbox{\hyperlink{group__Eet__File__Group_gabac3fef94bb732840b9ac9cc2917c4c6}{eet\+\_\+dictionary\+\_\+get()}}, and \mbox{\hyperlink{group__Eet__File__Cipher__Group_ga0c08a5881d6fd3474a8cbe03a445aff3}{eet\+\_\+write\+\_\+cipher()}}.



Referenced by \mbox{\hyperlink{group__Eet__Data__Group_gafb1d3207c31e349ed184645e21aa838d}{eet\+\_\+data\+\_\+undump()}}.

\Hypertarget{group__Eet__Data__Cipher__Group_ga29effd25b5a1b587e9e72289e23df01d}\label{group__Eet__Data__Cipher__Group_ga29effd25b5a1b587e9e72289e23df01d} 
\index{Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}!eet\_data\_descriptor\_decode\_cipher@{eet\_data\_descriptor\_decode\_cipher}}
\index{eet\_data\_descriptor\_decode\_cipher@{eet\_data\_descriptor\_decode\_cipher}!Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}}
\doxysubsubsubsubsection{\texorpdfstring{eet\_data\_descriptor\_decode\_cipher()}{eet\_data\_descriptor\_decode\_cipher()}}
{\footnotesize\ttfamily EAPI void \texorpdfstring{$\ast$}{*} eet\+\_\+data\+\_\+descriptor\+\_\+decode\+\_\+cipher (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor}} \texorpdfstring{$\ast$}{*}}]{edd,  }\item[{const void \texorpdfstring{$\ast$}{*}}]{data\+\_\+in,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{cipher\+\_\+key,  }\item[{int}]{size\+\_\+in }\end{DoxyParamCaption})}



Decodes a data structure from an arbitrary location in memory using a cipher. 


\begin{DoxyParams}{Parameters}
{\em edd} & The data descriptor to use when decoding. \\
\hline
{\em data\+\_\+in} & The pointer to the data to decode into a struct. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
{\em size\+\_\+in} & The size of the data pointed to in bytes. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
NULL on failure, or a valid decoded struct pointer on success.
\end{DoxyReturn}
This function will decode a data structure that has been encoded using \doxylink{group__Eet__Data__Group_gac9b29a0c31eabcfb0e660946cdd49dc5}{eet\+\_\+data\+\_\+descriptor\+\_\+encode()}, and return a data structure with all its elements filled out, if successful, or NULL on failure.

The data to be decoded is stored at the memory pointed to by {\ttfamily data\+\_\+in}, and is described by the descriptor pointed to by {\ttfamily edd}. The data size is passed in as the value to {\ttfamily size\+\_\+in}, and must be greater than 0 to succeed.

This function is useful for decoding data structures delivered to the application by means other than an eet file, such as an IPC or socket connection, raw files, shared memory etc.

Please see \doxylink{group__Eet__Data__Group_ga4c09f4dfb051baabc0c0551ea98b6830}{eet\+\_\+data\+\_\+read()} for more information.

\begin{DoxySeeAlso}{See also}
\doxylink{group__Eet__Data__Group_gaa050d172c60add6af4bbc30fc672f960}{eet\+\_\+data\+\_\+descriptor\+\_\+decode()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}.



Referenced by \mbox{\hyperlink{group__Eet__Data__Group_gaa050d172c60add6af4bbc30fc672f960}{eet\+\_\+data\+\_\+descriptor\+\_\+decode()}}, and \mbox{\hyperlink{group__Eet__Data__Cipher__Group_gaea292fec23a53c0c1e248914c7fe9860}{eet\+\_\+data\+\_\+xattr\+\_\+cipher\+\_\+get()}}.

\Hypertarget{group__Eet__Data__Cipher__Group_gac31bca0d53d723a7fcb6b38135f348b7}\label{group__Eet__Data__Cipher__Group_gac31bca0d53d723a7fcb6b38135f348b7} 
\index{Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}!eet\_data\_descriptor\_encode\_cipher@{eet\_data\_descriptor\_encode\_cipher}}
\index{eet\_data\_descriptor\_encode\_cipher@{eet\_data\_descriptor\_encode\_cipher}!Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}}
\doxysubsubsubsubsection{\texorpdfstring{eet\_data\_descriptor\_encode\_cipher()}{eet\_data\_descriptor\_encode\_cipher()}}
{\footnotesize\ttfamily EAPI void \texorpdfstring{$\ast$}{*} eet\+\_\+data\+\_\+descriptor\+\_\+encode\+\_\+cipher (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor}} \texorpdfstring{$\ast$}{*}}]{edd,  }\item[{const void \texorpdfstring{$\ast$}{*}}]{data\+\_\+in,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{cipher\+\_\+key,  }\item[{int \texorpdfstring{$\ast$}{*}}]{size\+\_\+ret }\end{DoxyParamCaption})}



Encodes a data struct to memory and return that encoded data using a cipher. 


\begin{DoxyParams}{Parameters}
{\em edd} & The data descriptor to use when encoding. \\
\hline
{\em data\+\_\+in} & The pointer to the struct to encode into data. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
{\em size\+\_\+ret} & pointer to the an int to be filled with the decoded size. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
NULL on failure, or a valid encoded data chunk on success.
\end{DoxyReturn}
This function takes a data structure in memory and encodes it into a serialised chunk of data that can be decoded again by \doxylink{group__Eet__Data__Group_gaa050d172c60add6af4bbc30fc672f960}{eet\+\_\+data\+\_\+descriptor\+\_\+decode()}. This is useful for being able to transmit data structures across sockets, pipes, IPC or shared file mechanisms, without having to worry about memory space, machine type, endianness etc.

The parameter {\ttfamily edd} must point to a valid data descriptor, and {\ttfamily data\+\_\+in} must point to the right data structure to encode. If not, the encoding may fail.

On success a non NULL valid pointer is returned and what {\ttfamily size\+\_\+ret} points to is set to the size of this decoded data, in bytes. When the encoded data is no longer needed, call free() on it. On failure NULL is returned and what {\ttfamily size\+\_\+ret} points to is set to 0.

Please see \doxylink{group__Eet__Data__Group_gac66d1c49e3490bc5d803982d833ff8aa}{eet\+\_\+data\+\_\+write()} for more information.

\begin{DoxySeeAlso}{See also}
\doxylink{group__Eet__Data__Group_gac9b29a0c31eabcfb0e660946cdd49dc5}{eet\+\_\+data\+\_\+descriptor\+\_\+encode()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}.



Referenced by \mbox{\hyperlink{group__Eet__Connection__Group_gacd2289a85daa867e290a5f3e0e0d492d}{eet\+\_\+connection\+\_\+send()}}, \mbox{\hyperlink{group__Eet__Data__Group_gac9b29a0c31eabcfb0e660946cdd49dc5}{eet\+\_\+data\+\_\+descriptor\+\_\+encode()}}, and \mbox{\hyperlink{group__Eet__Data__Cipher__Group_ga4aae479401e75a035a4d1e9185223546}{eet\+\_\+data\+\_\+xattr\+\_\+cipher\+\_\+set()}}.

