summaryrefslogtreecommitdiff
path: root/toxencryptsave
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-10-16 20:59:52 -0400
committerirungentoo <irungentoo@gmail.com>2014-10-16 20:59:52 -0400
commit87130997cda2e37a1df17af4a4e5d16d2abfbf1b (patch)
tree51703e4ce88065cfdcd4522aa33bf6ba4a278cd1 /toxencryptsave
parent6114bd7f3ef1fda71e45e81f259074cf4f8e58eb (diff)
astyle toxencryptsave.
Diffstat (limited to 'toxencryptsave')
-rw-r--r--toxencryptsave/toxencryptsave.c10
-rw-r--r--toxencryptsave/toxencryptsave.h2
2 files changed, 9 insertions, 3 deletions
diff --git a/toxencryptsave/toxencryptsave.c b/toxencryptsave/toxencryptsave.c
index 7492f06b..31d2be9b 100644
--- a/toxencryptsave/toxencryptsave.c
+++ b/toxencryptsave/toxencryptsave.c
@@ -40,9 +40,15 @@
40 40
41#define TOX_PASS_KEY_LENGTH (crypto_box_KEYBYTES + crypto_pwhash_scryptsalsa208sha256_SALTBYTES) 41#define TOX_PASS_KEY_LENGTH (crypto_box_KEYBYTES + crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
42 42
43int tox_pass_encryption_extra_length() {return TOX_PASS_ENCRYPTION_EXTRA_LENGTH;} 43int tox_pass_encryption_extra_length()
44{
45 return TOX_PASS_ENCRYPTION_EXTRA_LENGTH;
46}
44 47
45int tox_pass_key_length() {return TOX_PASS_KEY_LENGTH;} 48int tox_pass_key_length()
49{
50 return TOX_PASS_KEY_LENGTH;
51}
46 52
47/* This "module" provides functions analogous to tox_load and tox_save in toxcore 53/* This "module" provides functions analogous to tox_load and tox_save in toxcore
48 * Clients should consider alerting their users that, unlike plain data, if even one bit 54 * Clients should consider alerting their users that, unlike plain data, if even one bit
diff --git a/toxencryptsave/toxencryptsave.h b/toxencryptsave/toxencryptsave.h
index d805cf97..b00570e0 100644
--- a/toxencryptsave/toxencryptsave.h
+++ b/toxencryptsave/toxencryptsave.h
@@ -101,7 +101,7 @@ int tox_encrypted_save(const Tox *tox, uint8_t *data, uint8_t *passphrase, uint3
101 * returns the length of the output data (== data_len - tox_pass_encryption_extra_length()) on success 101 * returns the length of the output data (== data_len - tox_pass_encryption_extra_length()) on success
102 * returns -1 on failure 102 * returns -1 on failure
103 */ 103 */
104int tox_pass_key_decrypt(const uint8_t* data, uint32_t length, const uint8_t* key, uint8_t* out); 104int tox_pass_key_decrypt(const uint8_t *data, uint32_t length, const uint8_t *key, uint8_t *out);
105 105
106/* Decrypts the given data with the given passphrase. The output array must be 106/* Decrypts the given data with the given passphrase. The output array must be
107 * at least data_len - tox_pass_encryption_extra_length() bytes long. This delegates 107 * at least data_len - tox_pass_encryption_extra_length() bytes long. This delegates