aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/kdf/kdf.cpp
blob: 793cd3d62d2c9f521293afb770932692751c9f6d (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
/*
* KDF Retrieval
* (C) 1999-2007 Jack Lloyd
*
* Botan is released under the Simplified BSD License (see license.txt)
*/

#include <botan/kdf.h>
#include <botan/internal/algo_registry.h>
#include <botan/exceptn.h>

namespace Botan {

KDF* get_kdf(const std::string& algo_spec)
   {
   SCAN_Name request(algo_spec);

   if(request.algo_name() == "Raw")
      return nullptr; // No KDF

   if(KDF* kdf = make_a<KDF>(algo_spec))
      return kdf;
   throw Algorithm_Not_Found(algo_spec);
   }

}