Skip to content

Commit 0542ffa

Browse files
Diadlorobinlinden
authored andcommitted
Adjust docs of few toxencrypt function to the code
Add correct information about behaviour if input pointer is NULL Fix #590
1 parent c49a6e7 commit 0542ffa

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

toxencryptsave/toxencryptsave.api.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ class pass_Key {
283283
* If the passed byte arrays are smaller than required, the behaviour is
284284
* undefined.
285285
*
286+
* If the cipher text pointer or the salt is NULL, this function returns false.
287+
*
286288
* Success does not say anything about the validity of the data, only that
287289
* data of the appropriate size was copied.
288290
*
@@ -307,7 +309,7 @@ static bool get_salt(const uint8_t *ciphertext, uint8_t[PASS_SALT_LENGTH] salt)
307309
* If the passed byte array is smaller than required, the behaviour is
308310
* undefined.
309311
*
310-
* If the cipher text pointer is NULL, this function returns false.
312+
* If the data pointer is NULL, the behaviour is undefined
311313
*
312314
* @return true if the data is encrypted by this module.
313315
*/

toxencryptsave/toxencryptsave.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ typedef enum TOX_ERR_GET_SALT {
355355
* If the passed byte arrays are smaller than required, the behaviour is
356356
* undefined.
357357
*
358+
* If the cipher text pointer or the salt is NULL, this function returns false.
359+
*
358360
* Success does not say anything about the validity of the data, only that
359361
* data of the appropriate size was copied.
360362
*
@@ -372,7 +374,7 @@ bool tox_get_salt(const uint8_t *ciphertext, uint8_t *salt, TOX_ERR_GET_SALT *er
372374
* If the passed byte array is smaller than required, the behaviour is
373375
* undefined.
374376
*
375-
* If the cipher text pointer is NULL, this function returns false.
377+
* If the data pointer is NULL, the behaviour is undefined
376378
*
377379
* @return true if the data is encrypted by this module.
378380
*/

0 commit comments

Comments
 (0)