summaryrefslogtreecommitdiff
path: root/toxencryptsave/toxencryptsave.c
diff options
context:
space:
mode:
authorGregory Mullen (grayhatter) <greg@grayhatter.com>2016-09-24 16:26:35 -0700
committerGregory Mullen (grayhatter) <greg@grayhatter.com>2016-09-28 12:12:39 -0700
commit51139a080c982a6460aa25975b3a1e0866f518ed (patch)
tree4fb34aa71d9d73ddae7fd17865c1330fc4ca69b7 /toxencryptsave/toxencryptsave.c
parent95b8365af690595d9d1b8d9aa9f6ed56c710e13e (diff)
v0.0.0 => v0.0.1
Diffstat (limited to 'toxencryptsave/toxencryptsave.c')
-rw-r--r--toxencryptsave/toxencryptsave.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/toxencryptsave/toxencryptsave.c b/toxencryptsave/toxencryptsave.c
index 69e5c0f3..a6a75b0d 100644
--- a/toxencryptsave/toxencryptsave.c
+++ b/toxencryptsave/toxencryptsave.c
@@ -47,30 +47,6 @@
47#error TOX_PASS_ENCRYPTION_EXTRA_LENGTH is assumed to be equal to (crypto_box_MACBYTES + crypto_box_NONCEBYTES + crypto_pwhash_scryptsalsa208sha256_SALTBYTES + TOX_ENC_SAVE_MAGIC_LENGTH) 47#error TOX_PASS_ENCRYPTION_EXTRA_LENGTH is assumed to be equal to (crypto_box_MACBYTES + crypto_box_NONCEBYTES + crypto_pwhash_scryptsalsa208sha256_SALTBYTES + TOX_ENC_SAVE_MAGIC_LENGTH)
48#endif 48#endif
49 49
50uint32_t toxes_version_major(void)
51{
52 return TOXES_VERSION_MAJOR;
53}
54
55uint32_t toxes_version_minor(void)
56{
57 return TOXES_VERSION_MINOR;
58}
59
60uint32_t toxes_version_patch(void)
61{
62 return TOXES_VERSION_PATCH;
63}
64
65bool toxes_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch)
66{
67 return (TOXES_VERSION_MAJOR == major && /* Force the major version */
68 (TOXES_VERSION_MINOR > minor || /* Current minor version must be newer than requested -- or -- */
69 (TOXES_VERSION_MINOR == minor && TOXES_VERSION_PATCH >= patch) /* the patch must be the same or newer */
70 )
71 );
72}
73
74/* Clients should consider alerting their users that, unlike plain data, if even one bit 50/* Clients should consider alerting their users that, unlike plain data, if even one bit
75 * becomes corrupted, the data will be entirely unrecoverable. 51 * becomes corrupted, the data will be entirely unrecoverable.
76 * Ditto if they forget their password, there is no way to recover the data. 52 * Ditto if they forget their password, there is no way to recover the data.