summaryrefslogtreecommitdiff
path: root/toxencryptsave/toxencryptsave.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2015-03-17 16:20:38 -0400
committerirungentoo <irungentoo@gmail.com>2015-03-17 16:20:38 -0400
commit8286c2c22fc110dcc58c981eb39dd7bf46ae8aa9 (patch)
tree94c6141216575735cb1a1388f6d953b42d5403ba /toxencryptsave/toxencryptsave.c
parent67f6d0857afbd915c0d6668656d1207f574f1d1d (diff)
Save function renamed to tox_get_savedata()
Diffstat (limited to 'toxencryptsave/toxencryptsave.c')
-rw-r--r--toxencryptsave/toxencryptsave.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/toxencryptsave/toxencryptsave.c b/toxencryptsave/toxencryptsave.c
index f9846ac9..587c7048 100644
--- a/toxencryptsave/toxencryptsave.c
+++ b/toxencryptsave/toxencryptsave.c
@@ -66,7 +66,7 @@ int tox_pass_salt_length()
66/* return size of the messenger data (for encrypted saving). */ 66/* return size of the messenger data (for encrypted saving). */
67uint32_t tox_encrypted_size(const Tox *tox) 67uint32_t tox_encrypted_size(const Tox *tox)
68{ 68{
69 return tox_save_size(tox) + TOX_PASS_ENCRYPTION_EXTRA_LENGTH; 69 return tox_get_savedata_size(tox) + TOX_PASS_ENCRYPTION_EXTRA_LENGTH;
70} 70}
71 71
72/* This retrieves the salt used to encrypt the given data, which can then be passed to 72/* This retrieves the salt used to encrypt the given data, which can then be passed to
@@ -205,9 +205,9 @@ int tox_pass_encrypt(const uint8_t *data, uint32_t data_len, uint8_t *passphrase
205int tox_encrypted_save(const Tox *tox, uint8_t *data, uint8_t *passphrase, uint32_t pplength) 205int tox_encrypted_save(const Tox *tox, uint8_t *data, uint8_t *passphrase, uint32_t pplength)
206{ 206{
207 /* first get plain save data */ 207 /* first get plain save data */
208 uint32_t temp_size = tox_save_size(tox); 208 uint32_t temp_size = tox_get_savedata_size(tox);
209 uint8_t temp_data[temp_size]; 209 uint8_t temp_data[temp_size];
210 tox_save(tox, temp_data); 210 tox_get_savedata(tox, temp_data);
211 211
212 /* now encrypt */ 212 /* now encrypt */
213 return tox_pass_encrypt(temp_data, temp_size, passphrase, pplength, data); 213 return tox_pass_encrypt(temp_data, temp_size, passphrase, pplength, data);
@@ -222,9 +222,9 @@ int tox_encrypted_save(const Tox *tox, uint8_t *data, uint8_t *passphrase, uint3
222int tox_encrypted_key_save(const Tox *tox, uint8_t *data, uint8_t *key) 222int tox_encrypted_key_save(const Tox *tox, uint8_t *data, uint8_t *key)
223{ 223{
224 /* first get plain save data */ 224 /* first get plain save data */
225 uint32_t temp_size = tox_save_size(tox); 225 uint32_t temp_size = tox_get_savedata_size(tox);
226 uint8_t temp_data[temp_size]; 226 uint8_t temp_data[temp_size];
227 tox_save(tox, temp_data); 227 tox_get_savedata(tox, temp_data);
228 228
229 /* encrypt */ 229 /* encrypt */
230 return tox_pass_key_encrypt(temp_data, temp_size, key, data); 230 return tox_pass_key_encrypt(temp_data, temp_size, key, data);