X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fkey.h;h=ba68f0dd7025e59a3d9355dd02cd881e9c535a92;hb=d11488abd05cb39a9f481e7c4c35f780197a3d28;hp=4058f115fdd461a2a36db4909e7c1ba8e4e55576;hpb=3a4d81724e873f967b74759d539e05c73f95aeeb;p=novacoin.git diff --git a/src/key.h b/src/key.h index 4058f11..ba68f0d 100644 --- a/src/key.h +++ b/src/key.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_KEY_H #define BITCOIN_KEY_H @@ -54,6 +54,7 @@ typedef std::vector > CPrivKey; // CSecret is a serialization of just the secret parameter (32 bytes) typedef std::vector > CSecret; +/** An encapsulated OpenSSL Elliptic Curve key (public and/or private) */ class CKey { protected: @@ -172,7 +173,7 @@ public: CPrivKey GetPrivKey() const { - unsigned int nSize = i2d_ECPrivateKey(pkey, NULL); + int nSize = i2d_ECPrivateKey(pkey, NULL); if (!nSize) throw key_error("CKey::GetPrivKey() : i2d_ECPrivateKey failed"); CPrivKey vchPrivKey(nSize, 0); @@ -195,7 +196,7 @@ public: std::vector GetPubKey() const { - unsigned int nSize = i2o_ECPublicKey(pkey, NULL); + int nSize = i2o_ECPublicKey(pkey, NULL); if (!nSize) throw key_error("CKey::GetPubKey() : i2o_ECPublicKey failed"); std::vector vchPubKey(nSize, 0);