moved common code to LocalDestination

This commit is contained in:
orignal 2014-08-25 22:47:12 -04:00
parent 04c9a96fcb
commit 7aacae30eb
8 changed files with 20 additions and 28 deletions

View file

@ -230,11 +230,17 @@ namespace data
public:
virtual ~LocalDestination() {};
virtual const IdentityEx& GetIdentity () const = 0;
virtual const PrivateKeys& GetPrivateKeys () const = 0;
virtual const uint8_t * GetEncryptionPrivateKey () const = 0;
virtual const uint8_t * GetEncryptionPublicKey () const = 0;
virtual void Sign (const uint8_t * buf, int len, uint8_t * signature) const = 0;
virtual void SetLeaseSetUpdated () = 0;
const IdentityEx& GetIdentity () const { return GetPrivateKeys ().GetPublic (); };
const IdentHash& GetIdentHash () const { return GetIdentity ().GetIdentHash (); };
void Sign (const uint8_t * buf, int len, uint8_t * signature) const
{
GetPrivateKeys ().Sign (buf, len, signature);
};
};
}
}