\hypertarget{group__Eet__Data__Cipher__Group}{}\section{Eet Data Serialization using A Ciphers}
\label{group__Eet__Data__Cipher__Group}\index{Eet Data Serialization using A Ciphers@{Eet Data Serialization using A Ciphers}}


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


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} void $\ast$ \hyperlink{group__Eet__Data__Cipher__Group_ga418b7f00fc7f2e0cc94b33787eddbe08}{eet\+\_\+data\+\_\+read\+\_\+cipher} (\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File} $\ast$ef, \hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor} $\ast$edd, const char $\ast$name, const char $\ast$cipher\+\_\+key)
\begin{DoxyCompactList}\small\item\em Read a data structure from an eet file and decodes it using a cipher. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} void $\ast$ \hyperlink{group__Eet__Data__Cipher__Group_ga34dcdab8c3af830faddd6b9cd74fcb98}{eet\+\_\+data\+\_\+read\+\_\+cipher\+\_\+buffer} (\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File} $\ast$ef, \hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor} $\ast$edd, const char $\ast$name, const char $\ast$cipher\+\_\+key, char $\ast$buffer, int buffer\+\_\+size)
\begin{DoxyCompactList}\small\item\em Read a data structure from an eet file and decodes it into a buffer using a cipher,. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} void $\ast$ \hyperlink{group__Eet__Data__Cipher__Group_ga6faefbe585855ab98aebeaf0cdc503b9}{eet\+\_\+data\+\_\+xattr\+\_\+cipher\+\_\+get} (const char $\ast$filename, const char $\ast$attribute, \hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor} $\ast$edd, const char $\ast$cipher\+\_\+key)
\begin{DoxyCompactList}\small\item\em Read a data structure from an eet extended attribute and decodes it using a cipher. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} int \hyperlink{group__Eet__Data__Cipher__Group_ga9e46230c55006296f141ed9a5807c759}{eet\+\_\+data\+\_\+write\+\_\+cipher} (\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File} $\ast$ef, \hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor} $\ast$edd, const char $\ast$name, const char $\ast$cipher\+\_\+key, const void $\ast$data, int compress)
\begin{DoxyCompactList}\small\item\em Write a data structure from memory and store in an eet file using a cipher. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eet__Data__Cipher__Group_ga4aae479401e75a035a4d1e9185223546}{eet\+\_\+data\+\_\+xattr\+\_\+cipher\+\_\+set} (const char $\ast$filename, const char $\ast$attribute, \hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor} $\ast$edd, const char $\ast$cipher\+\_\+key, const void $\ast$data, \hyperlink{group__Eina__Tools__Group_ga016f6b7c97a22104a6ba6d1b042548c8}{Eina\+\_\+\+Xattr\+\_\+\+Flags} flags)
\begin{DoxyCompactList}\small\item\em Write a data structure from memory and store in an eet extended attribute using a cipher. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} int \hyperlink{group__Eet__Data__Cipher__Group_gac85bb8a9b46804288bb5e37caf21fd1c}{eet\+\_\+data\+\_\+text\+\_\+dump\+\_\+cipher} (const void $\ast$data\+\_\+in, const char $\ast$cipher\+\_\+key, int size\+\_\+in, Eet\+\_\+\+Dump\+\_\+\+Callback dumpfunc, void $\ast$dumpdata)
\begin{DoxyCompactList}\small\item\em Dump an eet encoded data structure into ascii text using a cipher. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} void $\ast$ \hyperlink{group__Eet__Data__Cipher__Group_ga99e8a3acd6c3fbe552b0f9d474ae4f0d}{eet\+\_\+data\+\_\+text\+\_\+undump\+\_\+cipher} (const char $\ast$text, const char $\ast$cipher\+\_\+key, int textlen, int $\ast$size\+\_\+ret)
\begin{DoxyCompactList}\small\item\em Take an ascii encoding from \hyperlink{group__Eet__Data__Group_ga4160a247c086955b4734af896b6fd270}{eet\+\_\+data\+\_\+text\+\_\+dump()} and re-\/encode in binary using a cipher. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} int \hyperlink{group__Eet__Data__Cipher__Group_ga5f80e7c90720422ee595f229fd8fcbef}{eet\+\_\+data\+\_\+dump\+\_\+cipher} (\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File} $\ast$ef, const char $\ast$name, const char $\ast$cipher\+\_\+key, Eet\+\_\+\+Dump\+\_\+\+Callback dumpfunc, void $\ast$dumpdata)
\begin{DoxyCompactList}\small\item\em Dump an eet encoded data structure from an eet file into ascii text using a cipher. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} int \hyperlink{group__Eet__Data__Cipher__Group_ga58060eca71513b8634a32e076dc8dd85}{eet\+\_\+data\+\_\+undump\+\_\+cipher} (\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File} $\ast$ef, const char $\ast$name, const char $\ast$cipher\+\_\+key, const char $\ast$text, int textlen, int compress)
\begin{DoxyCompactList}\small\item\em Take an ascii encoding from \hyperlink{group__Eet__Data__Group_ga33b90cc41fe0e6fffc6b4fb0c8c62a99}{eet\+\_\+data\+\_\+dump()} and re-\/encode in binary using a cipher. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} void $\ast$ \hyperlink{group__Eet__Data__Cipher__Group_ga139dd65b6d66537da27f3e9dd620a631}{eet\+\_\+data\+\_\+descriptor\+\_\+decode\+\_\+cipher} (\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor} $\ast$edd, const void $\ast$data\+\_\+in, const char $\ast$cipher\+\_\+key, int size\+\_\+in)
\begin{DoxyCompactList}\small\item\em Decode a data structure from an arbitrary location in memory using a cipher. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} void $\ast$ \hyperlink{group__Eet__Data__Cipher__Group_gab765474a660b0dfe5f00d99a960206db}{eet\+\_\+data\+\_\+descriptor\+\_\+encode\+\_\+cipher} (\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\+\_\+\+Data\+\_\+\+Descriptor} $\ast$edd, const void $\ast$data\+\_\+in, const char $\ast$cipher\+\_\+key, int $\ast$size\+\_\+ret)
\begin{DoxyCompactList}\small\item\em Encode a data struct to memory and return that encoded data using a cipher. \end{DoxyCompactList}\end{DoxyCompactItemize}


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

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


\subsection{Function Documentation}
\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}}
\subsubsection[{\texorpdfstring{eet\+\_\+data\+\_\+read\+\_\+cipher(\+Eet\+\_\+\+File $\ast$ef, Eet\+\_\+\+Data\+\_\+\+Descriptor $\ast$edd, const char $\ast$name, const char $\ast$cipher\+\_\+key)}{eet_data_read_cipher(Eet_File *ef, Eet_Data_Descriptor *edd, const char *name, const char *cipher_key)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} void$\ast$ eet\+\_\+data\+\_\+read\+\_\+cipher (
\begin{DoxyParamCaption}
\item[{{\bf Eet\+\_\+\+File} $\ast$}]{ef, }
\item[{{\bf Eet\+\_\+\+Data\+\_\+\+Descriptor} $\ast$}]{edd, }
\item[{const char $\ast$}]{name, }
\item[{const char $\ast$}]{cipher\+\_\+key}
\end{DoxyParamCaption}
)}\hypertarget{group__Eet__Data__Cipher__Group_ga418b7f00fc7f2e0cc94b33787eddbe08}{}\label{group__Eet__Data__Cipher__Group_ga418b7f00fc7f2e0cc94b33787eddbe08}


Read 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 N\+U\+LL 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}
\hyperlink{group__Eet__Data__Group_ga4d1807cbbc448304f22a8808318a3429}{eet\+\_\+data\+\_\+read()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


References eet\+\_\+dictionary\+\_\+get(), eet\+\_\+read\+\_\+cipher(), and eet\+\_\+read\+\_\+direct().



Referenced by eet\+\_\+data\+\_\+read().

\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}}
\subsubsection[{\texorpdfstring{eet\+\_\+data\+\_\+read\+\_\+cipher\+\_\+buffer(\+Eet\+\_\+\+File $\ast$ef, Eet\+\_\+\+Data\+\_\+\+Descriptor $\ast$edd, const char $\ast$name, const char $\ast$cipher\+\_\+key, char $\ast$buffer, int buffer\+\_\+size)}{eet_data_read_cipher_buffer(Eet_File *ef, Eet_Data_Descriptor *edd, const char *name, const char *cipher_key, char *buffer, int buffer_size)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} void$\ast$ eet\+\_\+data\+\_\+read\+\_\+cipher\+\_\+buffer (
\begin{DoxyParamCaption}
\item[{{\bf Eet\+\_\+\+File} $\ast$}]{ef, }
\item[{{\bf Eet\+\_\+\+Data\+\_\+\+Descriptor} $\ast$}]{edd, }
\item[{const char $\ast$}]{name, }
\item[{const char $\ast$}]{cipher\+\_\+key, }
\item[{char $\ast$}]{buffer, }
\item[{int}]{buffer\+\_\+size}
\end{DoxyParamCaption}
)}\hypertarget{group__Eet__Data__Cipher__Group_ga34dcdab8c3af830faddd6b9cd74fcb98}{}\label{group__Eet__Data__Cipher__Group_ga34dcdab8c3af830faddd6b9cd74fcb98}


Read 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 N\+U\+LL 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 N\+U\+LL 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}
\hyperlink{group__Eet__Data__Cipher__Group_ga418b7f00fc7f2e0cc94b33787eddbe08}{eet\+\_\+data\+\_\+read\+\_\+cipher()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+10.\+0 
\end{DoxySince}


References eet\+\_\+dictionary\+\_\+get(), eet\+\_\+read\+\_\+cipher(), and eet\+\_\+read\+\_\+direct().

\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}}
\subsubsection[{\texorpdfstring{eet\+\_\+data\+\_\+xattr\+\_\+cipher\+\_\+get(const char $\ast$filename, const char $\ast$attribute, Eet\+\_\+\+Data\+\_\+\+Descriptor $\ast$edd, const char $\ast$cipher\+\_\+key)}{eet_data_xattr_cipher_get(const char *filename, const char *attribute, Eet_Data_Descriptor *edd, const char *cipher_key)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} void$\ast$ eet\+\_\+data\+\_\+xattr\+\_\+cipher\+\_\+get (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{filename, }
\item[{const char $\ast$}]{attribute, }
\item[{{\bf Eet\+\_\+\+Data\+\_\+\+Descriptor} $\ast$}]{edd, }
\item[{const char $\ast$}]{cipher\+\_\+key}
\end{DoxyParamCaption}
)}\hypertarget{group__Eet__Data__Cipher__Group_ga6faefbe585855ab98aebeaf0cdc503b9}{}\label{group__Eet__Data__Cipher__Group_ga6faefbe585855ab98aebeaf0cdc503b9}


Read 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 N\+U\+LL 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 eet\+\_\+data\+\_\+descriptor\+\_\+decode\+\_\+cipher(), and eina\+\_\+xattr\+\_\+get().

\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}}
\subsubsection[{\texorpdfstring{eet\+\_\+data\+\_\+write\+\_\+cipher(\+Eet\+\_\+\+File $\ast$ef, Eet\+\_\+\+Data\+\_\+\+Descriptor $\ast$edd, const char $\ast$name, const char $\ast$cipher\+\_\+key, const void $\ast$data, int compress)}{eet_data_write_cipher(Eet_File *ef, Eet_Data_Descriptor *edd, const char *name, const char *cipher_key, const void *data, int compress)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} int eet\+\_\+data\+\_\+write\+\_\+cipher (
\begin{DoxyParamCaption}
\item[{{\bf Eet\+\_\+\+File} $\ast$}]{ef, }
\item[{{\bf Eet\+\_\+\+Data\+\_\+\+Descriptor} $\ast$}]{edd, }
\item[{const char $\ast$}]{name, }
\item[{const char $\ast$}]{cipher\+\_\+key, }
\item[{const void $\ast$}]{data, }
\item[{int}]{compress}
\end{DoxyParamCaption}
)}\hypertarget{group__Eet__Data__Cipher__Group_ga9e46230c55006296f141ed9a5807c759}{}\label{group__Eet__Data__Cipher__Group_ga9e46230c55006296f141ed9a5807c759}


Write 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 \hyperlink{group__Eet__Data__Cipher__Group_ga418b7f00fc7f2e0cc94b33787eddbe08}{eet\+\_\+data\+\_\+read\+\_\+cipher()}, saving a data structure to an eet file.

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


References eet\+\_\+dictionary\+\_\+get(), and eet\+\_\+write\+\_\+cipher().



Referenced by eet\+\_\+data\+\_\+write().

\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}}
\subsubsection[{\texorpdfstring{eet\+\_\+data\+\_\+xattr\+\_\+cipher\+\_\+set(const char $\ast$filename, const char $\ast$attribute, Eet\+\_\+\+Data\+\_\+\+Descriptor $\ast$edd, const char $\ast$cipher\+\_\+key, const void $\ast$data, Eina\+\_\+\+Xattr\+\_\+\+Flags flags)}{eet_data_xattr_cipher_set(const char *filename, const char *attribute, Eet_Data_Descriptor *edd, const char *cipher_key, const void *data, Eina_Xattr_Flags flags)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} {\bf Eina\+\_\+\+Bool} eet\+\_\+data\+\_\+xattr\+\_\+cipher\+\_\+set (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{filename, }
\item[{const char $\ast$}]{attribute, }
\item[{{\bf Eet\+\_\+\+Data\+\_\+\+Descriptor} $\ast$}]{edd, }
\item[{const char $\ast$}]{cipher\+\_\+key, }
\item[{const void $\ast$}]{data, }
\item[{{\bf Eina\+\_\+\+Xattr\+\_\+\+Flags}}]{flags}
\end{DoxyParamCaption}
)}\hypertarget{group__Eet__Data__Cipher__Group_ga4aae479401e75a035a4d1e9185223546}{}\label{group__Eet__Data__Cipher__Group_ga4aae479401e75a035a4d1e9185223546}


Write 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}
E\+I\+N\+A\+\_\+\+T\+R\+UE on success, E\+I\+N\+A\+\_\+\+F\+A\+L\+SE on failure.
\end{DoxyReturn}
This function is the reverse of \hyperlink{group__Eet__Data__Cipher__Group_ga6faefbe585855ab98aebeaf0cdc503b9}{eet\+\_\+data\+\_\+xattr\+\_\+cipher\+\_\+get()}, saving a data structure to an eet extended attribute.

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


References eet\+\_\+data\+\_\+descriptor\+\_\+encode\+\_\+cipher(), E\+I\+N\+A\+\_\+\+F\+A\+L\+SE, and eina\+\_\+xattr\+\_\+set().

\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}}
\subsubsection[{\texorpdfstring{eet\+\_\+data\+\_\+text\+\_\+dump\+\_\+cipher(const void $\ast$data\+\_\+in, const char $\ast$cipher\+\_\+key, int size\+\_\+in, Eet\+\_\+\+Dump\+\_\+\+Callback dumpfunc, void $\ast$dumpdata)}{eet_data_text_dump_cipher(const void *data_in, const char *cipher_key, int size_in, Eet_Dump_Callback dumpfunc, void *dumpdata)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} int eet\+\_\+data\+\_\+text\+\_\+dump\+\_\+cipher (
\begin{DoxyParamCaption}
\item[{const void $\ast$}]{data\+\_\+in, }
\item[{const char $\ast$}]{cipher\+\_\+key, }
\item[{int}]{size\+\_\+in, }
\item[{Eet\+\_\+\+Dump\+\_\+\+Callback}]{dumpfunc, }
\item[{void $\ast$}]{dumpdata}
\end{DoxyParamCaption}
)}\hypertarget{group__Eet__Data__Cipher__Group_gac85bb8a9b46804288bb5e37caf21fd1c}{}\label{group__Eet__Data__Cipher__Group_gac85bb8a9b46804288bb5e37caf21fd1c}


Dump 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}
1 on success, 0 on failure
\end{DoxyReturn}
This function will take a chunk of data encoded by \hyperlink{group__Eet__Data__Group_gaa7c3b3a8cbeffc34c21dbbb1decc3c2d}{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}
1 void output(void *data, const char *string)
2 \{
3   printf("%s", string);
4 \}
5 
6 void dump(const char *file)
7 \{
8   FILE *f;
9   int len;
10   void *data;
11 
12   f = fopen(file, "rb");
13   fseek(f, 0, SEEK\_END);
14   len = ftell(f);
15   rewind(f);
16   data = malloc(len);
17   fread(data, len, 1, f);
18   fclose(f);
19   eet\_data\_text\_dump\_cipher(data, cipher\_key, len, output, NULL);
20 \}
\end{DoxyCode}


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


References eet\+\_\+node\+\_\+del(), and eet\+\_\+node\+\_\+dump().



Referenced by eet\+\_\+data\+\_\+text\+\_\+dump().

\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}}
\subsubsection[{\texorpdfstring{eet\+\_\+data\+\_\+text\+\_\+undump\+\_\+cipher(const char $\ast$text, const char $\ast$cipher\+\_\+key, int textlen, int $\ast$size\+\_\+ret)}{eet_data_text_undump_cipher(const char *text, const char *cipher_key, int textlen, int *size_ret)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} void$\ast$ eet\+\_\+data\+\_\+text\+\_\+undump\+\_\+cipher (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{text, }
\item[{const char $\ast$}]{cipher\+\_\+key, }
\item[{int}]{textlen, }
\item[{int $\ast$}]{size\+\_\+ret}
\end{DoxyParamCaption}
)}\hypertarget{group__Eet__Data__Cipher__Group_ga99e8a3acd6c3fbe552b0f9d474ae4f0d}{}\label{group__Eet__Data__Cipher__Group_ga99e8a3acd6c3fbe552b0f9d474ae4f0d}


Take an ascii encoding from \hyperlink{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, N\+U\+LL on failure.
\end{DoxyReturn}
This function will parse the string pointed to by {\ttfamily text} and return an encoded data lump the same way \hyperlink{group__Eet__Data__Group_gaa7c3b3a8cbeffc34c21dbbb1decc3c2d}{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}
\hyperlink{group__Eet__Data__Group_ga7ec4079e08e657a80bee05bd12e1b972}{eet\+\_\+data\+\_\+text\+\_\+undump()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


Referenced by eet\+\_\+data\+\_\+text\+\_\+undump().

\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}}
\subsubsection[{\texorpdfstring{eet\+\_\+data\+\_\+dump\+\_\+cipher(\+Eet\+\_\+\+File $\ast$ef, const char $\ast$name, const char $\ast$cipher\+\_\+key, Eet\+\_\+\+Dump\+\_\+\+Callback dumpfunc, void $\ast$dumpdata)}{eet_data_dump_cipher(Eet_File *ef, const char *name, const char *cipher_key, Eet_Dump_Callback dumpfunc, void *dumpdata)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} int eet\+\_\+data\+\_\+dump\+\_\+cipher (
\begin{DoxyParamCaption}
\item[{{\bf Eet\+\_\+\+File} $\ast$}]{ef, }
\item[{const char $\ast$}]{name, }
\item[{const char $\ast$}]{cipher\+\_\+key, }
\item[{Eet\+\_\+\+Dump\+\_\+\+Callback}]{dumpfunc, }
\item[{void $\ast$}]{dumpdata}
\end{DoxyParamCaption}
)}\hypertarget{group__Eet__Data__Cipher__Group_ga5f80e7c90720422ee595f229fd8fcbef}{}\label{group__Eet__Data__Cipher__Group_ga5f80e7c90720422ee595f229fd8fcbef}


Dump 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\+: \char`\"{}/base/file\+\_\+i\+\_\+want\char`\"{}. \\
\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}
1 on success, 0 on failure
\end{DoxyReturn}
This function will take an open and valid eet file from \hyperlink{group__Eet__File__Group_ga5f55956b860aa2c77af9b1a880c4c256}{eet\+\_\+open()} request the data encoded by \hyperlink{group__Eet__Data__Group_gaa7c3b3a8cbeffc34c21dbbb1decc3c2d}{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}
\hyperlink{group__Eet__Data__Group_ga33b90cc41fe0e6fffc6b4fb0c8c62a99}{eet\+\_\+data\+\_\+dump()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


References eet\+\_\+dictionary\+\_\+get(), eet\+\_\+node\+\_\+del(), eet\+\_\+node\+\_\+dump(), eet\+\_\+read\+\_\+cipher(), and eet\+\_\+read\+\_\+direct().



Referenced by eet\+\_\+data\+\_\+dump().

\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}}
\subsubsection[{\texorpdfstring{eet\+\_\+data\+\_\+undump\+\_\+cipher(\+Eet\+\_\+\+File $\ast$ef, const char $\ast$name, const char $\ast$cipher\+\_\+key, const char $\ast$text, int textlen, int compress)}{eet_data_undump_cipher(Eet_File *ef, const char *name, const char *cipher_key, const char *text, int textlen, int compress)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} int eet\+\_\+data\+\_\+undump\+\_\+cipher (
\begin{DoxyParamCaption}
\item[{{\bf Eet\+\_\+\+File} $\ast$}]{ef, }
\item[{const char $\ast$}]{name, }
\item[{const char $\ast$}]{cipher\+\_\+key, }
\item[{const char $\ast$}]{text, }
\item[{int}]{textlen, }
\item[{int}]{compress}
\end{DoxyParamCaption}
)}\hypertarget{group__Eet__Data__Cipher__Group_ga58060eca71513b8634a32e076dc8dd85}{}\label{group__Eet__Data__Cipher__Group_ga58060eca71513b8634a32e076dc8dd85}


Take an ascii encoding from \hyperlink{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\+: \char`\"{}/base/file\+\_\+i\+\_\+want\char`\"{}. \\
\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}
1 on success, 0 on failure
\end{DoxyReturn}
This function will parse the string pointed to by {\ttfamily text}, encode it the same way \hyperlink{group__Eet__Data__Group_gaa7c3b3a8cbeffc34c21dbbb1decc3c2d}{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}
\hyperlink{group__Eet__Data__Group_gafb1d3207c31e349ed184645e21aa838d}{eet\+\_\+data\+\_\+undump()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


References eet\+\_\+dictionary\+\_\+get(), and eet\+\_\+write\+\_\+cipher().



Referenced by eet\+\_\+data\+\_\+undump().

\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}}
\subsubsection[{\texorpdfstring{eet\+\_\+data\+\_\+descriptor\+\_\+decode\+\_\+cipher(\+Eet\+\_\+\+Data\+\_\+\+Descriptor $\ast$edd, const void $\ast$data\+\_\+in, const char $\ast$cipher\+\_\+key, int size\+\_\+in)}{eet_data_descriptor_decode_cipher(Eet_Data_Descriptor *edd, const void *data_in, const char *cipher_key, int size_in)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} void$\ast$ eet\+\_\+data\+\_\+descriptor\+\_\+decode\+\_\+cipher (
\begin{DoxyParamCaption}
\item[{{\bf Eet\+\_\+\+Data\+\_\+\+Descriptor} $\ast$}]{edd, }
\item[{const void $\ast$}]{data\+\_\+in, }
\item[{const char $\ast$}]{cipher\+\_\+key, }
\item[{int}]{size\+\_\+in}
\end{DoxyParamCaption}
)}\hypertarget{group__Eet__Data__Cipher__Group_ga139dd65b6d66537da27f3e9dd620a631}{}\label{group__Eet__Data__Cipher__Group_ga139dd65b6d66537da27f3e9dd620a631}


Decode 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}
N\+U\+LL on failure, or a valid decoded struct pointer on success.
\end{DoxyReturn}
This function will decode a data structure that has been encoded using \hyperlink{group__Eet__Data__Group_gaa7c3b3a8cbeffc34c21dbbb1decc3c2d}{eet\+\_\+data\+\_\+descriptor\+\_\+encode()}, and return a data structure with all its elements filled out, if successful, or N\+U\+LL 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}, ande 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 I\+PC or socket connection, raw files, shared memory etc.

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

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


Referenced by eet\+\_\+data\+\_\+descriptor\+\_\+decode(), and eet\+\_\+data\+\_\+xattr\+\_\+cipher\+\_\+get().

\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}}
\subsubsection[{\texorpdfstring{eet\+\_\+data\+\_\+descriptor\+\_\+encode\+\_\+cipher(\+Eet\+\_\+\+Data\+\_\+\+Descriptor $\ast$edd, const void $\ast$data\+\_\+in, const char $\ast$cipher\+\_\+key, int $\ast$size\+\_\+ret)}{eet_data_descriptor_encode_cipher(Eet_Data_Descriptor *edd, const void *data_in, const char *cipher_key, int *size_ret)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} void$\ast$ eet\+\_\+data\+\_\+descriptor\+\_\+encode\+\_\+cipher (
\begin{DoxyParamCaption}
\item[{{\bf Eet\+\_\+\+Data\+\_\+\+Descriptor} $\ast$}]{edd, }
\item[{const void $\ast$}]{data\+\_\+in, }
\item[{const char $\ast$}]{cipher\+\_\+key, }
\item[{int $\ast$}]{size\+\_\+ret}
\end{DoxyParamCaption}
)}\hypertarget{group__Eet__Data__Cipher__Group_gab765474a660b0dfe5f00d99a960206db}{}\label{group__Eet__Data__Cipher__Group_gab765474a660b0dfe5f00d99a960206db}


Encode 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}
N\+U\+LL on failure, or a valid encoded data chunk on success.
\end{DoxyReturn}
This function takes a data structutre in memory and encodes it into a serialised chunk of data that can be decoded again by \hyperlink{group__Eet__Data__Group_gaad95530fdaec27047c41a5ceace5c231}{eet\+\_\+data\+\_\+descriptor\+\_\+decode()}. This is useful for being able to transmit data structures across sockets, pipes, I\+PC 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 N\+U\+LL 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 N\+U\+LL is returned and what {\ttfamily size\+\_\+ret} points to is set to 0.

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

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


Referenced by eet\+\_\+connection\+\_\+send(), eet\+\_\+data\+\_\+descriptor\+\_\+encode(), and eet\+\_\+data\+\_\+xattr\+\_\+cipher\+\_\+set().

