Add smart pointers to CKey objects.

This commit is contained in:
JoelKatz
2011-12-04 19:33:49 -08:00
parent 3ba41220c3
commit c8d9902044

4
key.h
View File

@@ -13,6 +13,8 @@
#include <openssl/ecdsa.h> #include <openssl/ecdsa.h>
#include <openssl/obj_mac.h> #include <openssl/obj_mac.h>
#include <boost/shared_ptr.hpp>
#include "SecureAllocator.h" #include "SecureAllocator.h"
#include "NewcoinAddress.h" #include "NewcoinAddress.h"
#include "uint256.h" #include "uint256.h"
@@ -85,6 +87,8 @@ protected:
bool fSet; bool fSet;
public: public:
typedef boost::shared_ptr<CKey> pointer;
CKey() CKey()
{ {
pkey = EC_KEY_new_by_curve_name(NID_secp256k1); pkey = EC_KEY_new_by_curve_name(NID_secp256k1);