blob: cf3205d1931ac8990f398439de0010568819cc1b (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/*
* Version Information
* (C) 1999-2011 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#include <botan/version.h>
#include <botan/parsing.h>
#include <sstream>
namespace Botan {
/*
These are intentionally compiled rather than inlined, so an
application running against a shared library can test the true
version they are running against.
*/
/*
* Return the version as a string
*/
std::string version_string()
{
std::ostringstream out;
out << "Botan " << version_major() << "."
<< version_minor() << "."
<< version_patch() << " (";
if(BOTAN_VERSION_DATESTAMP == 0)
out << "unreleased version";
else
out << "released " << version_datestamp();
out << ", distribution " << BOTAN_DISTRIBUTION_INFO << ")";
return out.str();
}
u32bit version_datestamp() { return BOTAN_VERSION_DATESTAMP; }
/*
* 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; }
}
|