aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pk_pad/emsa_pkcs1
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-02-03 08:11:45 +0000
committerlloyd <[email protected]>2015-02-03 08:11:45 +0000
commitf9a7c85b74be0f4a7273e8e0591703af83036e81 (patch)
tree075dbe119fc16863cad99b432ca6251778bd8fd1 /src/lib/pk_pad/emsa_pkcs1
parent69d2cd919c698a6b138b2ccba0de5d5aa2a33a03 (diff)
Convert PK operations to using Algo_Registry instead of Engine.
Remove global PRNG.
Diffstat (limited to 'src/lib/pk_pad/emsa_pkcs1')
-rw-r--r--src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp b/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp
index 1b46e3f13..8f6255b23 100644
--- a/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp
+++ b/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp
@@ -10,7 +10,19 @@
namespace Botan {
-BOTAN_REGISTER_EMSA_1HASH(EMSA_PKCS1v15, "EMSA_PKCS1");
+namespace {
+
+EMSA* make_pkcs1v15(const EMSA::Spec& spec)
+ {
+ if(spec.arg(0) == "Raw")
+ return new EMSA_PKCS1v15_Raw;
+ else
+ return new EMSA_PKCS1v15(make_a<HashFunction>(spec.arg(0)));
+ }
+
+}
+
+BOTAN_REGISTER_NAMED_T(EMSA, "EMSA_PKCS1", EMSA_PCS1v15, make_pkcs1v15);
namespace {