summaryrefslogtreecommitdiff
path: root/protocols/Tox/libtox/src/toxencryptsave/toxencryptsave.api.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/libtox/src/toxencryptsave/toxencryptsave.api.h')
-rw-r--r--protocols/Tox/libtox/src/toxencryptsave/toxencryptsave.api.h20
1 files changed, 5 insertions, 15 deletions
diff --git a/protocols/Tox/libtox/src/toxencryptsave/toxencryptsave.api.h b/protocols/Tox/libtox/src/toxencryptsave/toxencryptsave.api.h
index 61f685f86b..3adf3a9def 100644
--- a/protocols/Tox/libtox/src/toxencryptsave/toxencryptsave.api.h
+++ b/protocols/Tox/libtox/src/toxencryptsave/toxencryptsave.api.h
@@ -82,8 +82,7 @@ error for key_derivation {
NULL,
/**
* The crypto lib was unable to derive a key from the given passphrase,
- * which is usually a lack of memory issue. The functions accepting keys
- * do not produce this error.
+ * which is usually a lack of memory issue.
*/
FAILED,
}
@@ -192,21 +191,12 @@ class pass_Key {
* for encryption and decryption. It is derived from a salt and the user-
* provided password.
*
- * The $this structure is hidden in the implementation. It can be allocated
- * using $new and must be deallocated using $free.
+ * The $this structure is hidden in the implementation. It can be created
+ * using $derive or $derive_with_salt and must be deallocated using $free.
*/
struct this;
/**
- * Create a new $this. The initial value of it is indeterminate. To
- * initialise it, use one of the derive_* functions below.
- *
- * In case of failure, this function returns NULL. The only failure mode at
- * this time is memory allocation failure, so this function has no error code.
- */
- static this new();
-
- /**
* Deallocate a $this. This function behaves like free(), so NULL is an
* acceptable argument value.
*/
@@ -227,7 +217,7 @@ class pass_Key {
*
* @return true on success.
*/
- bool derive(const uint8_t[passphrase_len] passphrase)
+ static this derive(const uint8_t[passphrase_len] passphrase)
with error for key_derivation;
/**
@@ -239,7 +229,7 @@ class pass_Key {
*
* @return true on success.
*/
- bool derive_with_salt(const uint8_t[passphrase_len] passphrase, const uint8_t[PASS_SALT_LENGTH] salt)
+ static this derive_with_salt(const uint8_t[passphrase_len] passphrase, const uint8_t[PASS_SALT_LENGTH] salt)
with error for key_derivation;
/**