summaryrefslogtreecommitdiff
path: root/toxencryptsave
diff options
context:
space:
mode:
authorDiadlo <polsha3@gmail.com>2017-09-02 12:08:15 +0300
committerRobin Lindén <dev@robinlinden.eu>2017-10-27 00:29:25 +0200
commit0542ffa2db75fc6affd1b5c83bcb5af8e7d92c88 (patch)
tree56ce064d55f239287d50dae6f5be664df8b290e8 /toxencryptsave
parentc49a6e7f5bc245a51a3c85cc2c8b7f881c412998 (diff)
Adjust docs of few toxencrypt function to the code
Add correct information about behaviour if input pointer is NULL Fix #590
Diffstat (limited to 'toxencryptsave')
-rw-r--r--toxencryptsave/toxencryptsave.api.h4
-rw-r--r--toxencryptsave/toxencryptsave.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/toxencryptsave/toxencryptsave.api.h b/toxencryptsave/toxencryptsave.api.h
index 1844edf8..61f685f8 100644
--- a/toxencryptsave/toxencryptsave.api.h
+++ b/toxencryptsave/toxencryptsave.api.h
@@ -283,6 +283,8 @@ class pass_Key {
283 * If the passed byte arrays are smaller than required, the behaviour is 283 * If the passed byte arrays are smaller than required, the behaviour is
284 * undefined. 284 * undefined.
285 * 285 *
286 * If the cipher text pointer or the salt is NULL, this function returns false.
287 *
286 * Success does not say anything about the validity of the data, only that 288 * Success does not say anything about the validity of the data, only that
287 * data of the appropriate size was copied. 289 * data of the appropriate size was copied.
288 * 290 *
@@ -307,7 +309,7 @@ static bool get_salt(const uint8_t *ciphertext, uint8_t[PASS_SALT_LENGTH] salt)
307 * If the passed byte array is smaller than required, the behaviour is 309 * If the passed byte array is smaller than required, the behaviour is
308 * undefined. 310 * undefined.
309 * 311 *
310 * If the cipher text pointer is NULL, this function returns false. 312 * If the data pointer is NULL, the behaviour is undefined
311 * 313 *
312 * @return true if the data is encrypted by this module. 314 * @return true if the data is encrypted by this module.
313 */ 315 */
diff --git a/toxencryptsave/toxencryptsave.h b/toxencryptsave/toxencryptsave.h
index d13ebbc6..ef1ab152 100644
--- a/toxencryptsave/toxencryptsave.h
+++ b/toxencryptsave/toxencryptsave.h
@@ -355,6 +355,8 @@ typedef enum TOX_ERR_GET_SALT {
355 * If the passed byte arrays are smaller than required, the behaviour is 355 * If the passed byte arrays are smaller than required, the behaviour is
356 * undefined. 356 * undefined.
357 * 357 *
358 * If the cipher text pointer or the salt is NULL, this function returns false.
359 *
358 * Success does not say anything about the validity of the data, only that 360 * Success does not say anything about the validity of the data, only that
359 * data of the appropriate size was copied. 361 * data of the appropriate size was copied.
360 * 362 *
@@ -372,7 +374,7 @@ bool tox_get_salt(const uint8_t *ciphertext, uint8_t *salt, TOX_ERR_GET_SALT *er
372 * If the passed byte array is smaller than required, the behaviour is 374 * If the passed byte array is smaller than required, the behaviour is
373 * undefined. 375 * undefined.
374 * 376 *
375 * If the cipher text pointer is NULL, this function returns false. 377 * If the data pointer is NULL, the behaviour is undefined
376 * 378 *
377 * @return true if the data is encrypted by this module. 379 * @return true if the data is encrypted by this module.
378 */ 380 */