diff options
Diffstat (limited to 'toxencryptsave/toxencryptsave.h')
-rw-r--r-- | toxencryptsave/toxencryptsave.h | 8 |
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 | */ |
146 | bool tox_pass_encrypt(const uint8_t *data, size_t data_len, uint8_t *passphrase, size_t pplength, uint8_t *out, | 146 | bool 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 | */ |
158 | bool tox_pass_decrypt(const uint8_t *data, size_t length, uint8_t *passphrase, size_t pplength, uint8_t *out, | 158 | bool 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 | */ |
186 | bool tox_derive_key_from_pass(uint8_t *passphrase, size_t pplength, TOX_PASS_KEY *out_key, | 186 | bool 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 | */ |
192 | bool tox_derive_key_with_salt(uint8_t *passphrase, size_t pplength, uint8_t *salt, TOX_PASS_KEY *out_key, | 192 | bool 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 |