|
|
@ -90,8 +90,10 @@ namespace data |
|
|
|
size_t FromBase64(const std::string& s); |
|
|
|
size_t FromBase64(const std::string& s); |
|
|
|
std::string ToBase64 () const; |
|
|
|
std::string ToBase64 () const; |
|
|
|
const Identity& GetStandardIdentity () const { return m_StandardIdentity; }; |
|
|
|
const Identity& GetStandardIdentity () const { return m_StandardIdentity; }; |
|
|
|
|
|
|
|
|
|
|
|
const IdentHash& GetIdentHash () const { return m_IdentHash; }; |
|
|
|
const IdentHash& GetIdentHash () const { return m_IdentHash; }; |
|
|
|
const uint8_t * GetEncryptionPublicKey () const { return m_StandardIdentity.publicKey; }; |
|
|
|
const uint8_t * GetEncryptionPublicKey () const { return m_StandardIdentity.publicKey; }; |
|
|
|
|
|
|
|
uint8_t * GetEncryptionPublicKeyBuffer () { return m_StandardIdentity.publicKey; }; |
|
|
|
size_t GetFullLen () const { return m_ExtendedLen + DEFAULT_IDENTITY_SIZE; }; |
|
|
|
size_t GetFullLen () const { return m_ExtendedLen + DEFAULT_IDENTITY_SIZE; }; |
|
|
|
size_t GetSigningPublicKeyLen () const; |
|
|
|
size_t GetSigningPublicKeyLen () const; |
|
|
|
size_t GetSigningPrivateKeyLen () const; |
|
|
|
size_t GetSigningPrivateKeyLen () const; |
|
|
@ -103,6 +105,8 @@ namespace data |
|
|
|
|
|
|
|
|
|
|
|
bool operator == (const IdentityEx & other) const { return GetIdentHash() == other.GetIdentHash(); } |
|
|
|
bool operator == (const IdentityEx & other) const { return GetIdentHash() == other.GetIdentHash(); } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void RecalculateIdentHash(uint8_t * buff=nullptr); |
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
private: |
|
|
|
|
|
|
|
|
|
|
|
void CreateVerifier () const; |
|
|
|
void CreateVerifier () const; |
|
|
@ -132,6 +136,8 @@ namespace data |
|
|
|
std::shared_ptr<const IdentityEx> GetPublic () const { return m_Public; }; |
|
|
|
std::shared_ptr<const IdentityEx> GetPublic () const { return m_Public; }; |
|
|
|
const uint8_t * GetPrivateKey () const { return m_PrivateKey; }; |
|
|
|
const uint8_t * GetPrivateKey () const { return m_PrivateKey; }; |
|
|
|
const uint8_t * GetSigningPrivateKey () const { return m_SigningPrivateKey; }; |
|
|
|
const uint8_t * GetSigningPrivateKey () const { return m_SigningPrivateKey; }; |
|
|
|
|
|
|
|
uint8_t * GetPadding(); |
|
|
|
|
|
|
|
void RecalculateIdentHash(uint8_t * buf=nullptr) { m_Public->RecalculateIdentHash(buf); } |
|
|
|
void Sign (const uint8_t * buf, int len, uint8_t * signature) const; |
|
|
|
void Sign (const uint8_t * buf, int len, uint8_t * signature) const; |
|
|
|
|
|
|
|
|
|
|
|
size_t GetFullLen () const { return m_Public->GetFullLen () + 256 + m_Public->GetSigningPrivateKeyLen (); }; |
|
|
|
size_t GetFullLen () const { return m_Public->GetFullLen () + 256 + m_Public->GetSigningPrivateKeyLen (); }; |
|
|
|