diff options
author | René Korthaus <[email protected]> | 2016-04-13 19:07:33 +0200 |
---|---|---|
committer | René Korthaus <[email protected]> | 2016-06-14 17:33:50 +0200 |
commit | e14d6a0489ee290d289cf276fa3ff94044191af7 (patch) | |
tree | d3961328c1b6ba592a2114d3f231cd49c6c2a9a2 /src/lib/pk_pad/emsa.cpp | |
parent | 6816c9e71e01432792a997ad9a5d561b9cd94a48 (diff) |
Add ECKCDSA signature algorithm
Diffstat (limited to 'src/lib/pk_pad/emsa.cpp')
-rw-r--r-- | src/lib/pk_pad/emsa.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/pk_pad/emsa.cpp b/src/lib/pk_pad/emsa.cpp index 3b8641357..91bf44cf8 100644 --- a/src/lib/pk_pad/emsa.cpp +++ b/src/lib/pk_pad/emsa.cpp @@ -45,6 +45,19 @@ EMSA* get_emsa(const std::string& algo_spec) throw Algorithm_Not_Found(algo_spec); } +std::string hash_for_emsa(const std::string& algo_spec) + { + SCAN_Name emsa_name(algo_spec); + + if(emsa_name.arg_count() > 0) + { + const std::string pos_hash = emsa_name.arg(0); + return pos_hash; + } + + return "SHA-512"; // safe default if nothing we understand + } + #define BOTAN_REGISTER_EMSA_NAMED_NOARGS(type, name) \ BOTAN_REGISTER_NAMED_T(EMSA, name, type, make_new_T<type>) |