/* * EMSA/EME Retrieval * (C) 1999-2007 Jack Lloyd * * Botan is released under the Simplified BSD License (see license.txt) */ #include #include #include #include namespace Botan { EMSA* get_emsa(const std::string& algo_spec) { SCAN_Name request(algo_spec); if(EMSA* emsa = make_a(algo_spec)) return emsa; printf("EMSA missing? %s\n", algo_spec.c_str()); throw Algorithm_Not_Found(algo_spec); } EME* get_eme(const std::string& algo_spec) { SCAN_Name request(algo_spec); if(EME* eme = make_a(algo_spec)) return eme; if(request.algo_name() == "Raw") return nullptr; // No padding throw Algorithm_Not_Found(algo_spec); } }