summaryrefslogtreecommitdiff
path: root/src/lib/eet
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-03-17 08:50:37 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-03-17 09:58:19 +0100
commit8f3ec959b9d22d93f6ec38fc47e2339089598f8d (patch)
tree7785b85b47ceafeadf24573cdce2c6407f62dcfe /src/lib/eet
parentd32f310a9262dc055ea18ae0391b7dd629e283a6 (diff)
emile: change the API to allow supporting other cipher in the future.
Diffstat (limited to 'src/lib/eet')
-rw-r--r--src/lib/eet/eet_cipher.c4
-rw-r--r--src/lib/eet/eet_lib.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/eet/eet_cipher.c b/src/lib/eet/eet_cipher.c
index e625a5e713..119c12e62d 100644
--- a/src/lib/eet/eet_cipher.c
+++ b/src/lib/eet/eet_cipher.c
@@ -883,7 +883,7 @@ eet_cipher(const void *data,
883 Eina_Binbuf *in; 883 Eina_Binbuf *in;
884 884
885 in = eina_binbuf_manage_read_only_new_length(data, size); 885 in = eina_binbuf_manage_read_only_new_length(data, size);
886 out = emile_binbuf_cipher(in, key, length); 886 out = emile_binbuf_cipher(EMILE_AES256_CBC, in, key, length);
887 887
888 if (result_length) *result_length = out ? eina_binbuf_length_get(out) : 0; 888 if (result_length) *result_length = out ? eina_binbuf_length_get(out) : 0;
889 if (result) *result = out ? eina_binbuf_string_steal(out) : NULL; 889 if (result) *result = out ? eina_binbuf_string_steal(out) : NULL;
@@ -904,7 +904,7 @@ eet_decipher(const void *data,
904 Eina_Binbuf *in; 904 Eina_Binbuf *in;
905 905
906 in = eina_binbuf_manage_read_only_new_length(data, size); 906 in = eina_binbuf_manage_read_only_new_length(data, size);
907 out = emile_binbuf_decipher(in, key, length); 907 out = emile_binbuf_decipher(EMILE_AES256_CBC, in, key, length);
908 908
909 if (result_length) *result_length = out ? eina_binbuf_length_get(out) : 0; 909 if (result_length) *result_length = out ? eina_binbuf_length_get(out) : 0;
910 if (result) *result = out ? eina_binbuf_string_steal(out) : NULL; 910 if (result) *result = out ? eina_binbuf_string_steal(out) : NULL;
diff --git a/src/lib/eet/eet_lib.c b/src/lib/eet/eet_lib.c
index 1ee4eb6b53..04c9a05223 100644
--- a/src/lib/eet/eet_lib.c
+++ b/src/lib/eet/eet_lib.c
@@ -1873,7 +1873,8 @@ eet_read_cipher(Eet_File *ef,
1873 { 1873 {
1874 Eina_Binbuf *out; 1874 Eina_Binbuf *out;
1875 1875
1876 out = emile_binbuf_decipher(in, cipher_key, strlen(cipher_key)); 1876 out = emile_binbuf_decipher(EMILE_AES256_CBC, in,
1877 cipher_key, strlen(cipher_key));
1877 1878
1878 eina_binbuf_free(in); 1879 eina_binbuf_free(in);
1879 if (!out) goto on_error; 1880 if (!out) goto on_error;
@@ -2352,7 +2353,8 @@ eet_write_cipher(Eet_File *ef,
2352 { 2353 {
2353 Eina_Binbuf *out; 2354 Eina_Binbuf *out;
2354 2355
2355 out = emile_binbuf_cipher(in, cipher_key, strlen(cipher_key)); 2356 out = emile_binbuf_cipher(EMILE_AES256_CBC, in,
2357 cipher_key, strlen(cipher_key));
2356 // Old behaviour was to not fail if the cipher where not built in 2358 // Old behaviour was to not fail if the cipher where not built in
2357 if (out) 2359 if (out)
2358 { 2360 {