mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-27 16:29:44 -05:00
Add Database::verifyKey().
And make Database::hasKey() const.
This commit is contained in:
parent
b8b4d35763
commit
7286b1847d
@ -215,11 +215,18 @@ void Database::setKey(const CompositeKey& key)
|
|||||||
setKey(key, Random::randomArray(32));
|
setKey(key, Random::randomArray(32));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Database::hasKey()
|
bool Database::hasKey() const
|
||||||
{
|
{
|
||||||
return m_hasKey;
|
return m_hasKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Database::verifyKey(const CompositeKey& key) const
|
||||||
|
{
|
||||||
|
Q_ASSERT(hasKey());
|
||||||
|
|
||||||
|
return (m_key.rawKey() == key.rawKey());
|
||||||
|
}
|
||||||
|
|
||||||
void Database::createRecycleBin()
|
void Database::createRecycleBin()
|
||||||
{
|
{
|
||||||
Group* recycleBin = Group::createRecycleBin();
|
Group* recycleBin = Group::createRecycleBin();
|
||||||
|
@ -86,7 +86,8 @@ public:
|
|||||||
* Sets the database key and generates a random transform seed.
|
* Sets the database key and generates a random transform seed.
|
||||||
*/
|
*/
|
||||||
void setKey(const CompositeKey& key);
|
void setKey(const CompositeKey& key);
|
||||||
bool hasKey();
|
bool hasKey() const;
|
||||||
|
bool verifyKey(const CompositeKey& key) const;
|
||||||
void recycleEntry(Entry* entry);
|
void recycleEntry(Entry* entry);
|
||||||
void recycleGroup(Group* group);
|
void recycleGroup(Group* group);
|
||||||
void setEmitModified(bool value);
|
void setEmitModified(bool value);
|
||||||
|
Loading…
Reference in New Issue
Block a user