diff options
Diffstat (limited to 'src/version.cpp')
-rw-r--r-- | src/version.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/version.cpp b/src/version.cpp new file mode 100644 index 000000000..372634b24 --- /dev/null +++ b/src/version.cpp @@ -0,0 +1,28 @@ +/************************************************* +* Version Information Source File * +* (C) 1999-2007 The Botan Project * +*************************************************/ + +#include <botan/version.h> +#include <botan/parsing.h> + +namespace Botan { + +/************************************************* +* Return the version as a string * +*************************************************/ +std::string version_string() + { + return "Botan " + to_string(version_major()) + "." + + to_string(version_minor()) + "." + + to_string(version_patch()); + } + +/************************************************* +* Return parts of the version as integers * +*************************************************/ +u32bit version_major() { return BOTAN_VERSION_MAJOR; } +u32bit version_minor() { return BOTAN_VERSION_MINOR; } +u32bit version_patch() { return BOTAN_VERSION_PATCH; } + +} |