summaryrefslogtreecommitdiff
path: root/toxencryptsave/toxencryptsave.h
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2015-05-26 12:57:14 -0400
committerirungentoo <irungentoo@gmail.com>2015-05-26 12:57:14 -0400
commit51c5810d72cd81c0aaec9c10289185294112f3f5 (patch)
treeb4608b62b219e5b36b16c2b9a862d92a4d56053d /toxencryptsave/toxencryptsave.h
parent441e0073625b7ae9c69e977f510a8295e388a198 (diff)
These parameters should have been const.
Diffstat (limited to 'toxencryptsave/toxencryptsave.h')
-rw-r--r--toxencryptsave/toxencryptsave.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/toxencryptsave/toxencryptsave.h b/toxencryptsave/toxencryptsave.h
index c077d899..9e28b48e 100644
--- a/toxencryptsave/toxencryptsave.h
+++ b/toxencryptsave/toxencryptsave.h
@@ -143,7 +143,7 @@ typedef enum TOX_ERR_DECRYPTION {
143 * 143 *
144 * returns true on success 144 * returns true on success
145 */ 145 */
146bool tox_pass_encrypt(const uint8_t *data, size_t data_len, uint8_t *passphrase, size_t pplength, uint8_t *out, 146bool tox_pass_encrypt(const uint8_t *data, size_t data_len, const uint8_t *passphrase, size_t pplength, uint8_t *out,
147 TOX_ERR_ENCRYPTION *error); 147 TOX_ERR_ENCRYPTION *error);
148 148
149 149
@@ -155,7 +155,7 @@ bool tox_pass_encrypt(const uint8_t *data, size_t data_len, uint8_t *passphrase,
155 * 155 *
156 * returns true on success 156 * returns true on success
157 */ 157 */
158bool tox_pass_decrypt(const uint8_t *data, size_t length, uint8_t *passphrase, size_t pplength, uint8_t *out, 158bool tox_pass_decrypt(const uint8_t *data, size_t length, const uint8_t *passphrase, size_t pplength, uint8_t *out,
159 TOX_ERR_DECRYPTION *error); 159 TOX_ERR_DECRYPTION *error);
160 160
161 161
@@ -183,13 +183,13 @@ typedef struct {
183 * 183 *
184 * returns true on success 184 * returns true on success
185 */ 185 */
186bool tox_derive_key_from_pass(uint8_t *passphrase, size_t pplength, TOX_PASS_KEY *out_key, 186bool tox_derive_key_from_pass(const uint8_t *passphrase, size_t pplength, TOX_PASS_KEY *out_key,
187 TOX_ERR_KEY_DERIVATION *error); 187 TOX_ERR_KEY_DERIVATION *error);
188 188
189/* Same as above, except use the given salt for deterministic key derivation. 189/* Same as above, except use the given salt for deterministic key derivation.
190 * The salt must be TOX_PASS_SALT_LENGTH bytes in length. 190 * The salt must be TOX_PASS_SALT_LENGTH bytes in length.
191 */ 191 */
192bool tox_derive_key_with_salt(uint8_t *passphrase, size_t pplength, uint8_t *salt, TOX_PASS_KEY *out_key, 192bool tox_derive_key_with_salt(const uint8_t *passphrase, size_t pplength, const uint8_t *salt, TOX_PASS_KEY *out_key,
193 TOX_ERR_KEY_DERIVATION *error); 193 TOX_ERR_KEY_DERIVATION *error);
194 194
195/* This retrieves the salt used to encrypt the given data, which can then be passed to 195/* This retrieves the salt used to encrypt the given data, which can then be passed to