aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/version.cpp
blob: 09deb53d6e37c089666ed05f2c9f8d7aeb32239c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*************************************************
* Version Information Source File                *
* (C) 1999-2007 Jack Lloyd                       *
*************************************************/

#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; }

}