Function that allow ciphering content. More...
Typedefs | |
typedef enum _Emile_Cipher_Backend | Emile_Cipher_Backend |
Flags describing the implemented backend. More... | |
typedef enum _Emile_Cipher_Algorithm | Emile_Cipher_Algorithm |
Flags describing known cipher algorithm. More... | |
Enumerations | |
enum | _Emile_Cipher_Backend { EMILE_NONE, EMILE_OPENSSL, EMILE_GNUTLS } |
enum | _Emile_Cipher_Algorithm { EMILE_AES256_CBC } |
Functions | |
Eina_Bool | emile_cipher_init (void) |
Force the initialization of the underlying cipher library. More... | |
Emile_Cipher_Backend | emile_cipher_module_get (void) |
Get the name of the current used backend. More... | |
Eina_Binbuf * | emile_binbuf_cipher (Emile_Cipher_Algorithm algo, const Eina_Binbuf *in, const char *key, unsigned int length) |
Cipher a buffer with a defined algorithm and key. More... | |
Eina_Binbuf * | emile_binbuf_decipher (Emile_Cipher_Algorithm algo, const Eina_Binbuf *in, const char *key, unsigned int length) |
Decipher a buffer with a defined algorithm and key. More... | |
Function that allow ciphering content.
Flags describing the implemented backend.
Flags describing known cipher algorithm.
Eina_Bool emile_cipher_init | ( | void | ) |
Force the initialization of the underlying cipher library.
This call force the initialisation of GNUTLS or OpenSSL, so that you get the same setup for everyone.
References EINA_FALSE, and EINA_TRUE.
Referenced by eet_identity_certificate_print(), eet_identity_close(), eet_identity_open(), eet_identity_print(), emile_binbuf_cipher(), and emile_binbuf_decipher().
Emile_Cipher_Backend emile_cipher_module_get | ( | void | ) |
Get the name of the current used backend.
Eina_Binbuf* emile_binbuf_cipher | ( | Emile_Cipher_Algorithm | algo, |
const Eina_Binbuf * | in, | ||
const char * | key, | ||
unsigned int | length | ||
) |
Cipher a buffer with a defined algorithm and key.
algo | The algorithm to use to cipher the buffer. |
in | The buffer to cipher. |
key | The symetric key to use for ciphering. |
length | The length of the symetric key to be used. |
References eina_binbuf_append_buffer(), eina_binbuf_append_length(), eina_binbuf_free(), eina_binbuf_length_get(), eina_binbuf_new(), eina_binbuf_remove(), eina_binbuf_string_get(), and emile_cipher_init().
Referenced by eet_write_cipher().
Eina_Binbuf* emile_binbuf_decipher | ( | Emile_Cipher_Algorithm | algo, |
const Eina_Binbuf * | in, | ||
const char * | key, | ||
unsigned int | length | ||
) |
Decipher a buffer with a defined algorithm and key.
algo | The algorithm to use to decipher the buffer. |
in | The ciphered buffer to decipher. |
key | The symetric key used to cipher the buffer. |
length | The length of the symetric key used to cipher the buffer. |
References eina_binbuf_append_length(), eina_binbuf_free(), eina_binbuf_length_get(), eina_binbuf_new(), eina_binbuf_remove(), eina_binbuf_string_get(), and emile_cipher_init().
Referenced by eet_read_cipher().