diff options
author | Jack Lloyd <lloyd@randombit.net> | 2015-09-21 14:59:01 -0400 |
---|---|---|
committer | Jack Lloyd <lloyd@randombit.net> | 2015-09-21 14:59:01 -0400 |
commit | 04319af23bf8ed467b17f9b74c814343e051ab6b (patch) | |
tree | 630d1a0cc931e77e7e1f07319e5cf89d00af4458 /src/lib/pk_pad | |
parent | 408ea0a9b8ed0f575f8ee26891473920b42ef026 (diff) |
Remove use of lookup.h in favor of new T::create API.
Diffstat (limited to 'src/lib/pk_pad')
-rw-r--r-- | src/lib/pk_pad/eme_oaep/oaep.cpp | 5 | ||||
-rw-r--r-- | src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp | 5 | ||||
-rw-r--r-- | src/lib/pk_pad/emsa_pssr/pssr.cpp | 7 |
3 files changed, 7 insertions, 10 deletions
diff --git a/src/lib/pk_pad/eme_oaep/oaep.cpp b/src/lib/pk_pad/eme_oaep/oaep.cpp index a484202da..f214c25d2 100644 --- a/src/lib/pk_pad/eme_oaep/oaep.cpp +++ b/src/lib/pk_pad/eme_oaep/oaep.cpp @@ -8,7 +8,6 @@ #include <botan/oaep.h> #include <botan/mgf1.h> #include <botan/mem_ops.h> -#include <botan/lookup.h> namespace Botan { @@ -19,8 +18,8 @@ OAEP* OAEP::make(const Spec& request) if(request.arg_count() == 1 || (request.arg_count() == 2 && request.arg(1) == "MGF1")) { - if(HashFunction* hash = get_hash_function(request.arg(0))) - return new OAEP(hash); + if(auto hash = HashFunction::create(request.arg(0))) + return new OAEP(hash.release()); } } diff --git a/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp b/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp index 5e8462d4f..940f91c9a 100644 --- a/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp +++ b/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp @@ -7,7 +7,6 @@ #include <botan/emsa_pkcs1.h> #include <botan/hash_id.h> -#include <botan/lookup.h> namespace Botan { @@ -17,8 +16,8 @@ EMSA* EMSA_PKCS1v15::make(const EMSA::Spec& spec) return new EMSA_PKCS1v15_Raw; else { - if(HashFunction* h = get_hash_function(spec.arg(0))) - return new EMSA_PKCS1v15(h); + if(auto h = HashFunction::create(spec.arg(0))) + return new EMSA_PKCS1v15(h.release()); } return nullptr; } diff --git a/src/lib/pk_pad/emsa_pssr/pssr.cpp b/src/lib/pk_pad/emsa_pssr/pssr.cpp index 06ca007c8..36b0ab64c 100644 --- a/src/lib/pk_pad/emsa_pssr/pssr.cpp +++ b/src/lib/pk_pad/emsa_pssr/pssr.cpp @@ -8,7 +8,6 @@ #include <botan/pssr.h> #include <botan/mgf1.h> #include <botan/internal/bit_ops.h> -#include <botan/lookup.h> namespace Botan { @@ -17,10 +16,10 @@ PSSR* PSSR::make(const Spec& request) if(request.arg(1, "MGF1") != "MGF1") return nullptr; - if(HashFunction* hash = get_hash_function(request.arg(0))) + if(auto h = HashFunction::create(request.arg(0))) { - const size_t salt_size = request.arg_as_integer(2, hash->output_length()); - return new PSSR(hash, salt_size); + const size_t salt_size = request.arg_as_integer(2, h->output_length()); + return new PSSR(h.release(), salt_size); } return nullptr; |