diff options
author | Chris Moore <dooglus@gmail.com> | 2012-04-12 13:13:08 -0700 |
---|---|---|
committer | Chris Moore <dooglus@gmail.com> | 2012-04-12 13:13:08 -0700 |
commit | b3a6e613fc4c3261ff5a28f77b11398e60dca82a (patch) | |
tree | 47160cbd0caaa05e681fc83bde2afea47e6cbe86 /src/base58.h | |
parent | b7dc02381f0afe3ee3a542d06a44a64b2cde3812 (diff) |
CBitcoinSecret::SetString() now calls IsValid() to make sure it was passed something with the correct version.
Diffstat (limited to 'src/base58.h')
-rw-r--r-- | src/base58.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/base58.h b/src/base58.h index 755e34c418..7fefbc5d74 100644 --- a/src/base58.h +++ b/src/base58.h @@ -396,6 +396,16 @@ public: return fExpectTestNet == fTestNet && (vchData.size() == 32 || (vchData.size() == 33 && vchData[32] == 1)); } + bool SetString(const char* pszSecret) + { + return CBase58Data::SetString(pszSecret) && IsValid(); + } + + bool SetString(const std::string& strSecret) + { + return SetString(strSecret.c_str()); + } + CBitcoinSecret(const CSecret& vchSecret, bool fCompressed) { SetSecret(vchSecret, fCompressed); |