Merge commit '47ad96e2b6c5704872b3615a160cd78d29b46b21' toxcore v0.2.19
This commit is contained in:
@ -67,7 +67,8 @@ void tox_pass_key_free(Tox_Pass_Key *key)
|
||||
* produce the same key as was previously used. Any data encrypted with this
|
||||
* module can be used as input.
|
||||
*
|
||||
* The cipher text must be at least TOX_PASS_ENCRYPTION_EXTRA_LENGTH bytes in length.
|
||||
* The cipher text must be at least TOX_PASS_ENCRYPTION_EXTRA_LENGTH bytes in
|
||||
* length.
|
||||
* The salt must be TOX_PASS_SALT_LENGTH bytes in length.
|
||||
* If the passed byte arrays are smaller than required, the behaviour is
|
||||
* undefined.
|
||||
@ -182,10 +183,11 @@ Tox_Pass_Key *tox_pass_key_derive_with_salt(
|
||||
}
|
||||
|
||||
/**
|
||||
* Encrypt a plain text with a key produced by tox_pass_key_derive or tox_pass_key_derive_with_salt.
|
||||
* Encrypt a plain text with a key produced by tox_pass_key_derive or
|
||||
* tox_pass_key_derive_with_salt.
|
||||
*
|
||||
* The output array must be at least `plaintext_len + TOX_PASS_ENCRYPTION_EXTRA_LENGTH`
|
||||
* bytes long.
|
||||
* The output array must be at least
|
||||
* `plaintext_len + TOX_PASS_ENCRYPTION_EXTRA_LENGTH` bytes long.
|
||||
*
|
||||
* @param plaintext A byte array of length `plaintext_len`.
|
||||
* @param plaintext_len The length of the plain text array. Bigger than 0.
|
||||
@ -242,9 +244,9 @@ bool tox_pass_key_encrypt(const Tox_Pass_Key *key, const uint8_t plaintext[], si
|
||||
/**
|
||||
* Encrypts the given data with the given passphrase.
|
||||
*
|
||||
* The output array must be at least `plaintext_len + TOX_PASS_ENCRYPTION_EXTRA_LENGTH`
|
||||
* bytes long. This delegates to tox_pass_key_derive and
|
||||
* tox_pass_key_encrypt.
|
||||
* The output array must be at least
|
||||
* `plaintext_len + TOX_PASS_ENCRYPTION_EXTRA_LENGTH` bytes long. This delegates
|
||||
* to tox_pass_key_derive and tox_pass_key_encrypt.
|
||||
*
|
||||
* @param plaintext A byte array of length `plaintext_len`.
|
||||
* @param plaintext_len The length of the plain text array. Bigger than 0.
|
||||
@ -280,7 +282,8 @@ bool tox_pass_encrypt(const uint8_t plaintext[], size_t plaintext_len, const uin
|
||||
* tox_pass_key_derive or tox_pass_key_derive_with_salt.
|
||||
*
|
||||
* @param ciphertext A byte array of length `ciphertext_len`.
|
||||
* @param ciphertext_len The length of the cipher text array. At least TOX_PASS_ENCRYPTION_EXTRA_LENGTH.
|
||||
* @param ciphertext_len The length of the cipher text array. At least
|
||||
* TOX_PASS_ENCRYPTION_EXTRA_LENGTH.
|
||||
* @param plaintext The plain text array to write the decrypted data to.
|
||||
*
|
||||
* @return true on success.
|
||||
@ -326,11 +329,13 @@ bool tox_pass_key_decrypt(const Tox_Pass_Key *key, const uint8_t ciphertext[], s
|
||||
/**
|
||||
* Decrypts the given data with the given passphrase.
|
||||
*
|
||||
* The output array must be at least `ciphertext_len - TOX_PASS_ENCRYPTION_EXTRA_LENGTH`
|
||||
* bytes long. This delegates to tox_pass_key_decrypt.
|
||||
* The output array must be at least
|
||||
* `ciphertext_len - TOX_PASS_ENCRYPTION_EXTRA_LENGTH` bytes long. This
|
||||
* delegates to tox_pass_key_decrypt.
|
||||
*
|
||||
* @param ciphertext A byte array of length `ciphertext_len`.
|
||||
* @param ciphertext_len The length of the cipher text array. At least TOX_PASS_ENCRYPTION_EXTRA_LENGTH.
|
||||
* @param ciphertext_len The length of the cipher text array. At least
|
||||
* TOX_PASS_ENCRYPTION_EXTRA_LENGTH.
|
||||
* @param passphrase The user-provided password. Can be empty.
|
||||
* @param passphrase_len The length of the password.
|
||||
* @param plaintext The plain text array to write the decrypted data to.
|
||||
|
Reference in New Issue
Block a user