diff options
Diffstat (limited to 'toxencryptsave')
-rw-r--r-- | toxencryptsave/toxencryptsave.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/toxencryptsave/toxencryptsave.h b/toxencryptsave/toxencryptsave.h index 527578a5..2fb6a8c5 100644 --- a/toxencryptsave/toxencryptsave.h +++ b/toxencryptsave/toxencryptsave.h | |||
@@ -94,8 +94,17 @@ int tox_pass_encrypt(uint8_t *data, uint32_t data_len, uint8_t *passphrase, uint | |||
94 | */ | 94 | */ |
95 | int tox_encrypted_save(const Tox *tox, uint8_t *data, uint8_t *passphrase, uint32_t pplength); | 95 | int tox_encrypted_save(const Tox *tox, uint8_t *data, uint8_t *passphrase, uint32_t pplength); |
96 | 96 | ||
97 | /* This is the inverse of tox_pass_key_encrypt, also using only keys produced by | ||
98 | * tox_derive_key_from_pass. | ||
99 | * | ||
100 | * returns the length of the output data (== data_len - TOX_PASS_ENCRYPTION_EXTRA_LENGTH) on success | ||
101 | * returns -1 on failure | ||
102 | */ | ||
103 | int tox_pass_key_decrypt(const uint8_t* data, uint32_t length, const uint8_t* key, uint8_t* out); | ||
104 | |||
97 | /* Decrypts the given data with the given passphrase. The output array must be | 105 | /* Decrypts the given data with the given passphrase. The output array must be |
98 | * at least data_len - TOX_PASS_ENCRYPTION_EXTRA_LENGTH bytes long. | 106 | * at least data_len - TOX_PASS_ENCRYPTION_EXTRA_LENGTH bytes long. This delegates |
107 | * to tox_pass_key_decrypt. | ||
99 | * | 108 | * |
100 | * tox_encrypted_load() is a good example of how to use this function. | 109 | * tox_encrypted_load() is a good example of how to use this function. |
101 | * | 110 | * |