aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/pk_algs.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-03-04 03:22:35 +0000
committerlloyd <[email protected]>2010-03-04 03:22:35 +0000
commit76f39cc9fe4b2a3354db22f8beaf0c3788578b79 (patch)
treec25ddaf29f22dc29786487d606d68c2344c46f22 /src/pubkey/pk_algs.h
parentda09382f398dcf27a3ffdb82dd9f916ba96567ac (diff)
Add a new constructor to each public key algorithm (only the public
keys so far, private keys not changed) that takes an AlgorithmIdentifier and a MemoryRegion<byte>&. This performs the X.509 decoding. It is not possible anymore to create uninitialized PK objects.
Diffstat (limited to 'src/pubkey/pk_algs.h')
-rw-r--r--src/pubkey/pk_algs.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/pubkey/pk_algs.h b/src/pubkey/pk_algs.h
index c41bf1a63..3fbaed234 100644
--- a/src/pubkey/pk_algs.h
+++ b/src/pubkey/pk_algs.h
@@ -1,6 +1,6 @@
/*
* PK Key Factory
-* (C) 1999-2007 Jack Lloyd
+* (C) 1999-2010 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
@@ -12,19 +12,12 @@
namespace Botan {
-/**
-* Get an empty public key object.
-* @param name the name of the desired public key algorithm
-* @return the public key object
-*/
-BOTAN_DLL Public_Key* get_public_key(const std::string&);
+BOTAN_DLL Public_Key* make_public_key(const AlgorithmIdentifier& alg_id,
+ const MemoryRegion<byte>& key_bits);
-/**
-* Get an empty private key object.
-* @param name the name of the desired public key algorithm
-* @return the private key object
-*/
-BOTAN_DLL Private_Key* get_private_key(const std::string&);
+BOTAN_DLL Private_Key* make_private_key(const AlgorithmIdentifier& alg_id,
+ const MemoryRegion<byte>& key_bits,
+ RandomNumberGenerator& rng);
}