![]() |
XMSS Library
|
Public API for XMSS library version control. More...
Go to the source code of this file.
Macros | |
| #define | XMSS_VERSION_H_INCLUDED |
| Include guard. | |
| #define | XMSS_LIBRARY_VERSION_CONSTRUCT(major, minor, patch) |
| Construct an amalgamated semantic version from parts. More... | |
| #define | XMSS_LIBRARY_VERSION |
| The amalgamated semantic version (SemVer 2.0) of the library headers. More... | |
| #define | XMSS_LIBRARY_GET_VERSION_MAJOR(version) ((uint8_t)((((uint32_t)(version)) >> 16) & UINT8_MAX)) |
| Retrieve the major version from an amalgamated semantic version. More... | |
| #define | XMSS_LIBRARY_GET_VERSION_MINOR(version) ((uint8_t)((((uint32_t)(version)) >> 8) & UINT8_MAX)) |
| Retrieve the minor version from an amalgamated semantic version. More... | |
| #define | XMSS_LIBRARY_GET_VERSION_PATCH(version) ((uint8_t)(((uint32_t)(version)) & UINT8_MAX)) |
| Retrieve the patch version from an amalgamated semantic version. More... | |
Functions | |
| uint32_t | xmss_library_get_version (void) |
| Retrieve, at application runtime, the amalgamated semantic version (SemVer 2.0) of the library at build-time of the library. More... | |
Public API for XMSS library version control.
The macros and functions are currently all prefixed with XMSS_LIBRARY_ and xmss_library_ as currently only the library implementation is versioned, not the XMSS algorithm itself.
| #define XMSS_LIBRARY_GET_VERSION_MAJOR | ( | version | ) | ((uint8_t)((((uint32_t)(version)) >> 16) & UINT8_MAX)) |
Retrieve the major version from an amalgamated semantic version.
| [in] | version | An amalgamated semantic version. |
| #define XMSS_LIBRARY_GET_VERSION_MINOR | ( | version | ) | ((uint8_t)((((uint32_t)(version)) >> 8) & UINT8_MAX)) |
Retrieve the minor version from an amalgamated semantic version.
| [in] | version | An amalgamated semantic version. |
| #define XMSS_LIBRARY_GET_VERSION_PATCH | ( | version | ) | ((uint8_t)(((uint32_t)(version)) & UINT8_MAX)) |
Retrieve the patch version from an amalgamated semantic version.
| [in] | version | An amalgamated semantic version. |
| #define XMSS_LIBRARY_VERSION |
The amalgamated semantic version (SemVer 2.0) of the library headers.
To verify at compile-time that you are compiling against the expected library version, compare this value against the expected value constructed with XMSS_LIBRARY_VERSION_CONSTRUCT(). For example:
Alternatively, compare the values of the individual parts. For example:
| #define XMSS_LIBRARY_VERSION_CONSTRUCT | ( | major, | |
| minor, | |||
| patch | |||
| ) |
Construct an amalgamated semantic version from parts.
The resulting value may be compared directly against XMSS_LIBRARY_VERSION (intended for compile-time checks) and/or xmss_library_get_version() (intended for run time checks).
| [in] | major | The major version. |
| [in] | minor | The minor version. |
| [in] | patch | The patch version. |
| uint32_t xmss_library_get_version | ( | void | ) |
Retrieve, at application runtime, the amalgamated semantic version (SemVer 2.0) of the library at build-time of the library.
To verify at runtime that you are using the expected (binary) library version, compare this value against the expected value constructed with XMSS_LIBRARY_VERSION_CONSTRUCT(), or against XMSS_LIBRARY_VERSION. For example:
Alternatively, compare individual parts using XMSS_LIBRARY_GET_VERSION_MAJOR(), XMSS_LIBRARY_GET_VERSION_MINOR(), and/or XMSS_LIBRARY_GET_VERSION_MINOR(). For example: