aboutsummaryrefslogtreecommitdiff
path: root/src/base58.h
diff options
context:
space:
mode:
authorChris Moore <dooglus@gmail.com>2012-04-12 13:13:08 -0700
committerChris Moore <dooglus@gmail.com>2012-04-12 13:13:08 -0700
commitb3a6e613fc4c3261ff5a28f77b11398e60dca82a (patch)
tree47160cbd0caaa05e681fc83bde2afea47e6cbe86 /src/base58.h
parentb7dc02381f0afe3ee3a542d06a44a64b2cde3812 (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.h10
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);