mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
astyle toxencryptsave.
This commit is contained in:
parent
6114bd7f3e
commit
87130997cd
|
@ -40,9 +40,15 @@
|
||||||
|
|
||||||
#define TOX_PASS_KEY_LENGTH (crypto_box_KEYBYTES + crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
|
#define TOX_PASS_KEY_LENGTH (crypto_box_KEYBYTES + crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
|
||||||
|
|
||||||
int tox_pass_encryption_extra_length() {return TOX_PASS_ENCRYPTION_EXTRA_LENGTH;}
|
int tox_pass_encryption_extra_length()
|
||||||
|
{
|
||||||
|
return TOX_PASS_ENCRYPTION_EXTRA_LENGTH;
|
||||||
|
}
|
||||||
|
|
||||||
int tox_pass_key_length() {return TOX_PASS_KEY_LENGTH;}
|
int tox_pass_key_length()
|
||||||
|
{
|
||||||
|
return TOX_PASS_KEY_LENGTH;
|
||||||
|
}
|
||||||
|
|
||||||
/* This "module" provides functions analogous to tox_load and tox_save in toxcore
|
/* This "module" provides functions analogous to tox_load and tox_save in toxcore
|
||||||
* Clients should consider alerting their users that, unlike plain data, if even one bit
|
* Clients should consider alerting their users that, unlike plain data, if even one bit
|
||||||
|
|
|
@ -101,7 +101,7 @@ int tox_encrypted_save(const Tox *tox, uint8_t *data, uint8_t *passphrase, uint3
|
||||||
* returns the length of the output data (== data_len - tox_pass_encryption_extra_length()) on success
|
* returns the length of the output data (== data_len - tox_pass_encryption_extra_length()) on success
|
||||||
* returns -1 on failure
|
* returns -1 on failure
|
||||||
*/
|
*/
|
||||||
int tox_pass_key_decrypt(const uint8_t* data, uint32_t length, const uint8_t* key, uint8_t* out);
|
int tox_pass_key_decrypt(const uint8_t *data, uint32_t length, const uint8_t *key, uint8_t *out);
|
||||||
|
|
||||||
/* Decrypts the given data with the given passphrase. The output array must be
|
/* Decrypts the given data with the given passphrase. The output array must be
|
||||||
* at least data_len - tox_pass_encryption_extra_length() bytes long. This delegates
|
* at least data_len - tox_pass_encryption_extra_length() bytes long. This delegates
|
||||||
|
|
Loading…
Reference in New Issue
Block a user