Botan
1.11.15
|
00001 /* 00002 * KDF Retrieval 00003 * (C) 1999-2007 Jack Lloyd 00004 * 00005 * Botan is released under the Simplified BSD License (see license.txt) 00006 */ 00007 00008 #include <botan/kdf.h> 00009 #include <botan/internal/algo_registry.h> 00010 #include <botan/exceptn.h> 00011 00012 namespace Botan { 00013 00014 KDF* get_kdf(const std::string& algo_spec) 00015 { 00016 SCAN_Name request(algo_spec); 00017 00018 if(request.algo_name() == "Raw") 00019 return nullptr; // No KDF 00020 00021 if(KDF* kdf = make_a<KDF>(algo_spec)) 00022 return kdf; 00023 throw Algorithm_Not_Found(algo_spec); 00024 } 00025 00026 }