Add unit test TestKeePass2Reader.
This commit is contained in:
@@ -74,6 +74,7 @@ Database* KeePass2Reader::readDatabase(QIODevice* device, const CompositeKey& ke
|
||||
|
||||
if (realStart != m_streamStartBytes) {
|
||||
raiseError("4");
|
||||
return 0;
|
||||
}
|
||||
|
||||
HashedBlockStream hashedStream(&cipherStream);
|
||||
|
||||
@@ -19,6 +19,15 @@
|
||||
|
||||
#include "crypto/CryptoHash.h"
|
||||
|
||||
PasswordKey::PasswordKey()
|
||||
{
|
||||
}
|
||||
|
||||
PasswordKey::PasswordKey(const QString& password)
|
||||
{
|
||||
setPassword(password);
|
||||
}
|
||||
|
||||
QByteArray PasswordKey::rawKey() const
|
||||
{
|
||||
return m_key;
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
class PasswordKey : public Key
|
||||
{
|
||||
public:
|
||||
PasswordKey();
|
||||
PasswordKey(const QString& password);
|
||||
QByteArray rawKey() const;
|
||||
void setPassword(const QString& password);
|
||||
PasswordKey* clone() const;
|
||||
|
||||
Reference in New Issue
Block a user