Full checking of all loaded keys

This commit is contained in:
Pieter Wuille
2012-01-26 19:26:34 +01:00
parent 4c932cca6f
commit 91f43a33f8
2 changed files with 15 additions and 1 deletions

View File

@@ -307,6 +307,18 @@ public:
return false;
return true;
}
bool IsValid()
{
if (!fSet)
return false;
bool fCompr;
CSecret secret = GetSecret(fCompr);
CKey key2;
key2.SetSecret(secret, fCompr);
return GetPubKey() == key2.GetPubKey();
}
};
#endif