From 51139a080c982a6460aa25975b3a1e0866f518ed Mon Sep 17 00:00:00 2001 From: "Gregory Mullen (grayhatter)" Date: Sat, 24 Sep 2016 16:26:35 -0700 Subject: v0.0.0 => v0.0.1 --- toxencryptsave/toxencryptsave.c | 24 ------------- toxencryptsave/toxencryptsave.h | 74 ----------------------------------------- 2 files changed, 98 deletions(-) (limited to 'toxencryptsave') 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 @@ #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) #endif -uint32_t toxes_version_major(void) -{ - return TOXES_VERSION_MAJOR; -} - -uint32_t toxes_version_minor(void) -{ - return TOXES_VERSION_MINOR; -} - -uint32_t toxes_version_patch(void) -{ - return TOXES_VERSION_PATCH; -} - -bool toxes_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch) -{ - return (TOXES_VERSION_MAJOR == major && /* Force the major version */ - (TOXES_VERSION_MINOR > minor || /* Current minor version must be newer than requested -- or -- */ - (TOXES_VERSION_MINOR == minor && TOXES_VERSION_PATCH >= patch) /* the patch must be the same or newer */ - ) - ); -} - /* Clients should consider alerting their users that, unlike plain data, if even one bit * becomes corrupted, the data will be entirely unrecoverable. * Ditto if they forget their password, there is no way to recover the data. diff --git a/toxencryptsave/toxencryptsave.h b/toxencryptsave/toxencryptsave.h index 6451f3f5..a6537fad 100644 --- a/toxencryptsave/toxencryptsave.h +++ b/toxencryptsave/toxencryptsave.h @@ -49,80 +49,6 @@ struct Tox_Options; #define TOXES_DEFINED #endif /* TOXES_DEFINED */ - -/******************************************************************************* - * - * :: API version - * - ******************************************************************************/ -/** - * The major version number. Incremented when the API or ABI changes in an - * incompatible way. - */ -#define TOXES_VERSION_MAJOR 0u - -/** - * The minor version number. Incremented when functionality is added without - * breaking the API or ABI. Set to 0 when the major version number is - * incremented. - */ -#define TOXES_VERSION_MINOR 0u - -/** - * The patch or revision number. Incremented when bugfixes are applied without - * changing any functionality or API or ABI. - */ -#define TOXES_VERSION_PATCH 0u - -/** - * A macro to check at preprocessing time whether the client code is compatible - * with the installed version of ToxAV. - */ -#define TOXES_VERSION_IS_API_COMPATIBLE(MAJOR, MINOR, PATCH) \ - (TOXES_VERSION_MAJOR == MAJOR && \ - (TOXES_VERSION_MINOR > MINOR || \ - (TOXES_VERSION_MINOR == MINOR && \ - TOXES_VERSION_PATCH >= PATCH))) - -/** - * A macro to make compilation fail if the client code is not compatible with - * the installed version of ToxAV. - */ -#define TOXES_VERSION_REQUIRE(MAJOR, MINOR, PATCH) \ - typedef char toxes_required_version[TOXES_IS_COMPATIBLE(MAJOR, MINOR, PATCH) ? 1 : -1] - -/** - * A convenience macro to call toxES_version_is_compatible with the currently - * compiling API version. - */ -#define TOXES_VERSION_IS_ABI_COMPATIBLE() \ - toxes_version_is_compatible(TOXES_VERSION_MAJOR, TOXES_VERSION_MINOR, TOXES_VERSION_PATCH) - -/** - * Return the major version number of the library. Can be used to display the - * ToxAV library version or to check whether the client is compatible with the - * dynamically linked version of ToxAV. - */ -uint32_t toxes_version_major(void); - -/** - * Return the minor version number of the library. - */ -uint32_t toxes_version_minor(void); - -/** - * Return the patch number of the library. - */ -uint32_t toxes_version_patch(void); - -/** - * Return whether the compiled library version is compatible with the passed - * version numbers. - */ -bool toxes_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch); - - - /* This module is conceptually organized into two parts. The first part are the functions * with "key" in the name. To use these functions, first derive an encryption key * from a password with tox_derive_key_from_pass, and use the returned key to -- cgit v1.2.3