BN_zero -> BN_set_word
[novacoin.git] / src / key.h
index 45ce39b..8dd8f16 100644 (file)
--- a/src/key.h
+++ b/src/key.h
@@ -13,9 +13,9 @@
 #include "uint256.h"
 #include "hash.h"
 #include "bignum.h"
-#include "ies.h"
 
 #include <openssl/ec.h> // for EC_KEY definition
+#include <openssl/obj_mac.h>
 
 // secp160k1
 // const unsigned int PRIVATE_KEY_SIZE = 192;
@@ -206,9 +206,6 @@ public:
 
     // Reserialize to DER
     static bool ReserealizeSignature(std::vector<unsigned char>& vchSig);
-
-    // Encrypt data
-    void EncryptData(const std::vector<unsigned char>& data, std::vector<unsigned char>& encrypted);
 };
 
 // secure_allocator is defined in allocators.h
@@ -223,7 +220,6 @@ class CKey
 protected:
     EC_KEY* pkey;
     bool fSet;
-    bool fCompressedPubKey;
 
 public:
 
@@ -243,12 +239,11 @@ public:
     void SetCompressedPubKey(bool fCompressed=true);
     void MakeNewKey(bool fCompressed=true);
     bool SetPrivKey(const CPrivKey& vchPrivKey);
-    bool SetSecret(const CSecret& vchSecret, bool fCompressed = false);
+    bool SetSecret(const CSecret& vchSecret, bool fCompressed = true);
     CSecret GetSecret(bool &fCompressed) const;
     CSecret GetSecret() const;
     CPrivKey GetPrivKey() const;
     CPubKey GetPubKey() const;
-    bool WritePEM(BIO *streamObj, const SecureString &strPassKey) const;
 
     bool Sign(uint256 hash, std::vector<unsigned char>& vchSig);
 
@@ -262,9 +257,6 @@ public:
 
     // Check whether an element of a signature (r or s) is valid.
     static bool CheckSignatureElement(const unsigned char *vch, int len, bool half);
-
-    // Decrypt data
-    void DecryptData(const std::vector<unsigned char>& encrypted, std::vector<unsigned char>& data);
 };
 
 class CPoint