astyle toxencryptsave.

This commit is contained in:
irungentoo 2014-10-16 20:59:52 -04:00
parent 6114bd7f3e
commit 87130997cd
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98
2 changed files with 9 additions and 3 deletions

View File

@ -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

View File

@ -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