diff options
author | dubslow <bunslow@gmail.com> | 2014-10-12 02:28:18 -0500 |
---|---|---|
committer | dubslow <bunslow@gmail.com> | 2014-10-12 02:28:18 -0500 |
commit | ccfd777e35812a914dd0025487f219d5f503a1bd (patch) | |
tree | 22a83c38f2c82df0ac1e3510bcfbd41c32b80736 /toxencryptsave | |
parent | 54fdf3bdd653ebf6e55d2cb93fcae41e68436e11 (diff) |
apparently i forgot to add/commit these comments...
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 b85d945c..6abcca42 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 | * |