summaryrefslogtreecommitdiff
path: root/toxencryptsave/toxencryptsave.h
diff options
context:
space:
mode:
Diffstat (limited to 'toxencryptsave/toxencryptsave.h')
-rw-r--r--toxencryptsave/toxencryptsave.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/toxencryptsave/toxencryptsave.h b/toxencryptsave/toxencryptsave.h
index d03383e9..13641273 100644
--- a/toxencryptsave/toxencryptsave.h
+++ b/toxencryptsave/toxencryptsave.h
@@ -195,7 +195,7 @@ typedef enum TOX_ERR_DECRYPTION {
195 * 195 *
196 * @param plaintext A byte array of length `plaintext_len`. 196 * @param plaintext A byte array of length `plaintext_len`.
197 * @param plaintext_len The length of the plain text array. Bigger than 0. 197 * @param plaintext_len The length of the plain text array. Bigger than 0.
198 * @param passphrase The user-provided password. 198 * @param passphrase The user-provided password. Can be empty.
199 * @param passphrase_len The length of the password. 199 * @param passphrase_len The length of the password.
200 * @param ciphertext The cipher text array to write the encrypted data to. 200 * @param ciphertext The cipher text array to write the encrypted data to.
201 * 201 *
@@ -212,7 +212,7 @@ bool tox_pass_encrypt(const uint8_t *plaintext, size_t plaintext_len, const uint
212 * 212 *
213 * @param ciphertext A byte array of length `ciphertext_len`. 213 * @param ciphertext A byte array of length `ciphertext_len`.
214 * @param ciphertext_len The length of the cipher text array. At least TOX_PASS_ENCRYPTION_EXTRA_LENGTH. 214 * @param ciphertext_len The length of the cipher text array. At least TOX_PASS_ENCRYPTION_EXTRA_LENGTH.
215 * @param passphrase The user-provided password. 215 * @param passphrase The user-provided password. Can be empty.
216 * @param passphrase_len The length of the password. 216 * @param passphrase_len The length of the password.
217 * @param plaintext The plain text array to write the decrypted data to. 217 * @param plaintext The plain text array to write the decrypted data to.
218 * 218 *
@@ -252,6 +252,9 @@ typedef struct Tox_Pass_Key Tox_Pass_Key;
252/** 252/**
253 * Create a new Tox_Pass_Key. The initial value of it is indeterminate. To 253 * Create a new Tox_Pass_Key. The initial value of it is indeterminate. To
254 * initialise it, use one of the derive_* functions below. 254 * initialise it, use one of the derive_* functions below.
255 *
256 * In case of failure, this function returns NULL. The only failure mode at
257 * this time is memory allocation failure, so this function has no error code.
255 */ 258 */
256struct Tox_Pass_Key *tox_pass_key_new(void); 259struct Tox_Pass_Key *tox_pass_key_new(void);
257 260
@@ -271,7 +274,7 @@ void tox_pass_key_free(struct Tox_Pass_Key *_key);
271 * a password, you also must know the random salt that was used. A 274 * a password, you also must know the random salt that was used. A
272 * deterministic version of this function is tox_pass_key_derive_with_salt. 275 * deterministic version of this function is tox_pass_key_derive_with_salt.
273 * 276 *
274 * @param passphrase The user-provided password. 277 * @param passphrase The user-provided password. Can be empty.
275 * @param passphrase_len The length of the password. 278 * @param passphrase_len The length of the password.
276 * 279 *
277 * @return true on success. 280 * @return true on success.
@@ -282,7 +285,7 @@ bool tox_pass_key_derive(struct Tox_Pass_Key *_key, const uint8_t *passphrase, s
282/** 285/**
283 * Same as above, except use the given salt for deterministic key derivation. 286 * Same as above, except use the given salt for deterministic key derivation.
284 * 287 *
285 * @param passphrase The user-provided password. 288 * @param passphrase The user-provided password. Can be empty.
286 * @param passphrase_len The length of the password. 289 * @param passphrase_len The length of the password.
287 * @param salt An array of at least TOX_PASS_SALT_LENGTH bytes. 290 * @param salt An array of at least TOX_PASS_SALT_LENGTH bytes.
288 * 291 *