bool AsymmetricKey::VerifyKey(const AsymmetricKey &key) const { if(this->IsPrivateKey() == key.IsPrivateKey()) { return false; } QSharedPointer<AsymmetricKey> pkey0(this->GetPublicKey()); QSharedPointer<AsymmetricKey> pkey1(key.GetPublicKey()); return pkey0->Equals(*pkey1); }
bool LRSPublicKey::VerifyKey(AsymmetricKey &key) const { if(key.IsPrivateKey() ^ !IsPrivateKey()) { return false; } QSharedPointer<AsymmetricKey> key0(GetPublicKey()); QSharedPointer<AsymmetricKey> key1(key.GetPublicKey()); return key0 == key1; }