compute IdentHash in Identity method

This commit is contained in:
cpubug 2014-04-07 22:01:24 +04:00
parent 19333d5697
commit a82bd628c1
2 changed files with 10 additions and 0 deletions

View file

@ -24,6 +24,13 @@ namespace data
{
size_t count = Base64ToByteStream (s.c_str(), s.length(), reinterpret_cast<uint8_t*> (this), sizeof (Identity));
return count == sizeof(Identity);
}
IdentHash Identity::Hash()
{
IdentHash hash;
CryptoPP::SHA256().CalculateDigest(reinterpret_cast<uint8_t*>(&hash), reinterpret_cast<uint8_t*> (this), sizeof (Identity));
return hash;
}
PrivateKeys& PrivateKeys::operator=(const Keys& keys)