Implement all KeyStore methods except for password generation.
* Add all relevant message constants. * Implement the messaging to send/retrieve key info. * Implement _Flatten/_Unflatten for sending flat BKey objects. * Remove application list from BKey, the key can't only differ by allowed applications as the identifiers would still collide, so the comparison isn't needed to uniquely identify the key. The applications can be enumerated via the BKeyStore instead.
This commit is contained in:
committed by
Ryan Leavengood
parent
b73982892d
commit
1c3996496b
@@ -73,14 +73,19 @@ public:
|
||||
bool operator==(const BKey& other) const;
|
||||
bool operator!=(const BKey& other) const;
|
||||
|
||||
protected:
|
||||
virtual status_t _Flatten(BMessage& message) const;
|
||||
virtual status_t _Unflatten(const BMessage& message);
|
||||
|
||||
private:
|
||||
friend class BKeyStore;
|
||||
|
||||
BKeyPurpose fPurpose;
|
||||
BString fIdentifier;
|
||||
BString fSecondaryIdentifier;
|
||||
BString fOwner;
|
||||
bigtime_t fCreationTime;
|
||||
mutable BMallocIO fData;
|
||||
BObjectList<BString> fApplications;
|
||||
bool fRegistered;
|
||||
};
|
||||
|
||||
|
||||
@@ -93,6 +93,10 @@ public:
|
||||
status_t GeneratePassword(BPasswordKey& password,
|
||||
size_t length, uint32 flags);
|
||||
float PasswordStrength(const char* password);
|
||||
|
||||
private:
|
||||
status_t _SendKeyMessage(BMessage& message,
|
||||
BMessage* reply) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user