diff options
Diffstat (limited to 'toxencryptsave/toxencryptsave.api.h')
-rw-r--r-- | toxencryptsave/toxencryptsave.api.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/toxencryptsave/toxencryptsave.api.h b/toxencryptsave/toxencryptsave.api.h index b0e29b50..0356d756 100644 --- a/toxencryptsave/toxencryptsave.api.h +++ b/toxencryptsave/toxencryptsave.api.h | |||
@@ -146,7 +146,7 @@ error for decryption { | |||
146 | * | 146 | * |
147 | * @param plaintext A byte array of length `plaintext_len`. | 147 | * @param plaintext A byte array of length `plaintext_len`. |
148 | * @param plaintext_len The length of the plain text array. Bigger than 0. | 148 | * @param plaintext_len The length of the plain text array. Bigger than 0. |
149 | * @param passphrase The user-provided password. | 149 | * @param passphrase The user-provided password. Can be empty. |
150 | * @param passphrase_len The length of the password. | 150 | * @param passphrase_len The length of the password. |
151 | * @param ciphertext The cipher text array to write the encrypted data to. | 151 | * @param ciphertext The cipher text array to write the encrypted data to. |
152 | * | 152 | * |
@@ -164,7 +164,7 @@ static bool pass_encrypt(const uint8_t[plaintext_len] plaintext, const uint8_t[p | |||
164 | * | 164 | * |
165 | * @param ciphertext A byte array of length `ciphertext_len`. | 165 | * @param ciphertext A byte array of length `ciphertext_len`. |
166 | * @param ciphertext_len The length of the cipher text array. At least $PASS_ENCRYPTION_EXTRA_LENGTH. | 166 | * @param ciphertext_len The length of the cipher text array. At least $PASS_ENCRYPTION_EXTRA_LENGTH. |
167 | * @param passphrase The user-provided password. | 167 | * @param passphrase The user-provided password. Can be empty. |
168 | * @param passphrase_len The length of the password. | 168 | * @param passphrase_len The length of the password. |
169 | * @param plaintext The plain text array to write the decrypted data to. | 169 | * @param plaintext The plain text array to write the decrypted data to. |
170 | * | 170 | * |
@@ -200,6 +200,9 @@ class pass_Key { | |||
200 | /** | 200 | /** |
201 | * Create a new $this. The initial value of it is indeterminate. To | 201 | * Create a new $this. The initial value of it is indeterminate. To |
202 | * initialise it, use one of the derive_* functions below. | 202 | * initialise it, use one of the derive_* functions below. |
203 | * | ||
204 | * In case of failure, this function returns NULL. The only failure mode at | ||
205 | * this time is memory allocation failure, so this function has no error code. | ||
203 | */ | 206 | */ |
204 | static this new(); | 207 | static this new(); |
205 | 208 | ||
@@ -219,7 +222,7 @@ class pass_Key { | |||
219 | * a password, you also must know the random salt that was used. A | 222 | * a password, you also must know the random salt that was used. A |
220 | * deterministic version of this function is $derive_with_salt. | 223 | * deterministic version of this function is $derive_with_salt. |
221 | * | 224 | * |
222 | * @param passphrase The user-provided password. | 225 | * @param passphrase The user-provided password. Can be empty. |
223 | * @param passphrase_len The length of the password. | 226 | * @param passphrase_len The length of the password. |
224 | * | 227 | * |
225 | * @return true on success. | 228 | * @return true on success. |
@@ -230,7 +233,7 @@ class pass_Key { | |||
230 | /** | 233 | /** |
231 | * Same as above, except use the given salt for deterministic key derivation. | 234 | * Same as above, except use the given salt for deterministic key derivation. |
232 | * | 235 | * |
233 | * @param passphrase The user-provided password. | 236 | * @param passphrase The user-provided password. Can be empty. |
234 | * @param passphrase_len The length of the password. | 237 | * @param passphrase_len The length of the password. |
235 | * @param salt An array of at least $PASS_SALT_LENGTH bytes. | 238 | * @param salt An array of at least $PASS_SALT_LENGTH bytes. |
236 | * | 239 | * |