diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/eet_cipher.c | 8 | ||||
-rw-r--r-- | src/lib/eet_data.c | 13 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/lib/eet_cipher.c b/src/lib/eet_cipher.c index 29b09f3..55174d8 100644 --- a/src/lib/eet_cipher.c +++ b/src/lib/eet_cipher.c @@ -321,9 +321,9 @@ eet_identity_certificate_print(const unsigned char *certificate, int der_length, } Eet_Error -eet_cypher(void *data, unsigned int size, const char *key, unsigned int length) +eet_cipher(const void *data, unsigned int size, const char *key, unsigned int length, void **result, unsigned int *result_length) { -#ifdef HAVE_CYPHER +#ifdef HAVE_CIPHER (void) data; (void) size; (void) key; @@ -339,9 +339,9 @@ eet_cypher(void *data, unsigned int size, const char *key, unsigned int length) } Eet_Error -eet_decypher(void *data, unsigned int size, const char *key, unsigned int length) +eet_decipher(const void *data, unsigned int size, const char *key, unsigned int length, void **result, unsigned int *result_length) { -#ifdef HAVE_CYPHER +#ifdef HAVE_CIPHER (void) data; (void) size; (void) key; diff --git a/src/lib/eet_data.c b/src/lib/eet_data.c index 474f9c1..a74a512 100644 --- a/src/lib/eet_data.c +++ b/src/lib/eet_data.c @@ -3130,22 +3130,23 @@ eet_data_text_undump_cipher(const char *text, int *size_ret) { void *ret = NULL; - void *cyphered = NULL; - unsigned int cyphered_len; ret = _eet_data_dump_parse(NULL, size_ret, text, textlen); if (ret && key) { - if (eet_cipher(ret, *size_ret, key, strlen(key), &cyphered, &cyphered_len)) + void *ciphered = NULL; + unsigned int ciphered_len; + + if (eet_cipher(ret, *size_ret, key, strlen(key), &ciphered, &ciphered_len)) { - if (cyphered) free(cyphered); + if (ciphered) free(ciphered); size_ret = 0; free(ret); return NULL; } free(ret); - *size_ret = cyphered_len; - ret = cyphered; + *size_ret = ciphered_len; + ret = ciphered; } return ret; } |