diff --git a/Identity.cpp b/Identity.cpp index fd5c0b74..eb107ca3 100644 --- a/Identity.cpp +++ b/Identity.cpp @@ -19,6 +19,13 @@ namespace data return *this; } + PrivateKeys& PrivateKeys::operator=(const Keys& keys) + { + pub = keys; + memcpy (privateKey, keys.privateKey, 276); // 256 + 20 + return *this; + } + IdentHash CalculateIdentHash (const Identity& identity) { IdentHash hash; diff --git a/Identity.h b/Identity.h index 58d7849e..6b180999 100644 --- a/Identity.h +++ b/Identity.h @@ -33,6 +33,8 @@ namespace data Identity pub; uint8_t privateKey[256]; uint8_t signingPrivateKey[20]; + + PrivateKeys& operator=(const Keys& keys); }; #pragma pack()