mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-06-07 06:22:44 -04:00
Add Database::verifyKey().
And make Database::hasKey() const.
This commit is contained in:
parent
b8b4d35763
commit
7286b1847d
2 changed files with 10 additions and 2 deletions
|
@ -215,11 +215,18 @@ void Database::setKey(const CompositeKey& key)
|
|||
setKey(key, Random::randomArray(32));
|
||||
}
|
||||
|
||||
bool Database::hasKey()
|
||||
bool Database::hasKey() const
|
||||
{
|
||||
return m_hasKey;
|
||||
}
|
||||
|
||||
bool Database::verifyKey(const CompositeKey& key) const
|
||||
{
|
||||
Q_ASSERT(hasKey());
|
||||
|
||||
return (m_key.rawKey() == key.rawKey());
|
||||
}
|
||||
|
||||
void Database::createRecycleBin()
|
||||
{
|
||||
Group* recycleBin = Group::createRecycleBin();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue