Drop support for botan < 2.0

fix #3274
This commit is contained in:
louiz’
2017-07-20 21:22:58 +02:00
parent f0f3d3d4e2
commit ffb402f0ad
8 changed files with 10 additions and 62 deletions
-6
View File
@@ -18,13 +18,7 @@
std::string sha1(const std::string& input)
{
#ifdef BOTAN_FOUND
# if BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,11,34)
auto sha1 = Botan::HashFunction::create("SHA-1");
if (!sha1)
throw Botan::Algorithm_Not_Found("SHA-1");
# else
auto sha1 = Botan::HashFunction::create_or_throw("SHA-1");
# endif
sha1->update(input);
return Botan::hex_encode(sha1->final(), false);
#endif