summaryrefslogtreecommitdiff
path: root/toxencryptsave
diff options
context:
space:
mode:
authorMaxim Biro <nurupo.contributions@gmail.com>2016-12-09 03:01:36 -0500
committerMaxim Biro <nurupo.contributions@gmail.com>2016-12-09 03:01:36 -0500
commit697530af3b5a0f8e783f32caee3ebf48f7e7a3a7 (patch)
tree108dec6a4bd027a8a05c4d307465ff430d3253c2 /toxencryptsave
parentd8ae726d0a332c74da7bbed70982367dd01899e1 (diff)
Improve toxencryptsave documentation
Diffstat (limited to 'toxencryptsave')
-rw-r--r--toxencryptsave/toxencryptsave.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/toxencryptsave/toxencryptsave.h b/toxencryptsave/toxencryptsave.h
index a6537fad..5b2eea75 100644
--- a/toxencryptsave/toxencryptsave.h
+++ b/toxencryptsave/toxencryptsave.h
@@ -203,6 +203,9 @@ bool tox_derive_key_with_salt(const uint8_t *passphrase, size_t pplength, const
203 * derive_key_with_salt to produce the same key as was previously used. Any encrpyted 203 * derive_key_with_salt to produce the same key as was previously used. Any encrpyted
204 * data with this module can be used as input. 204 * data with this module can be used as input.
205 * 205 *
206 * The data must be at least TOX_PASS_ENCRYPTION_EXTRA_LENGTH bytes in length.
207 * The salt must be TOX_PASS_SALT_LENGTH bytes in length.
208 *
206 * returns true if magic number matches 209 * returns true if magic number matches
207 * success does not say anything about the validity of the data, only that data of 210 * success does not say anything about the validity of the data, only that data of
208 * the appropriate size was copied 211 * the appropriate size was copied
@@ -232,7 +235,11 @@ bool tox_pass_key_encrypt(const uint8_t *data, size_t data_len, const TOX_PASS_K
232bool tox_pass_key_decrypt(const uint8_t *data, size_t length, const TOX_PASS_KEY *key, uint8_t *out, 235bool tox_pass_key_decrypt(const uint8_t *data, size_t length, const TOX_PASS_KEY *key, uint8_t *out,
233 TOX_ERR_DECRYPTION *error); 236 TOX_ERR_DECRYPTION *error);
234 237
235/* Determines whether or not the given data is encrypted (by checking the magic number) 238/* Determines whether or not the given data is encrypted (by checking the magic number).
239 *
240 * The data must be at least TOX_PASS_ENCRYPTION_EXTRA_LENGTH bytes in length.
241 *
242 * returns true on success
236 */ 243 */
237bool tox_is_data_encrypted(const uint8_t *data); 244bool tox_is_data_encrypted(const uint8_t *data);
238 245