keys: CompositeKey: Add ChallengeResponseKey support
* Each Challenge Response Key consists of a list of regular keys and now challenge response keys. * Copy ChallengeResponseKeys when copying the object. * Challenge consists of challenging each driver in the list and hashing the concatenated data result using SHA256. Signed-off-by: Kyle Manna <kyle@kylemanna.com>
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <QList>
|
||||
|
||||
#include "keys/Key.h"
|
||||
#include "keys/ChallengeResponseKey.h"
|
||||
|
||||
class CompositeKey : public Key
|
||||
{
|
||||
@@ -36,7 +37,10 @@ public:
|
||||
QByteArray rawKey() const;
|
||||
QByteArray transform(const QByteArray& seed, quint64 rounds,
|
||||
bool* ok, QString* errorString) const;
|
||||
QByteArray challenge(const QByteArray& seed) const;
|
||||
|
||||
void addKey(const Key& key);
|
||||
void addChallengeResponseKey(const ChallengeResponseKey& key);
|
||||
|
||||
static int transformKeyBenchmark(int msec);
|
||||
|
||||
@@ -45,6 +49,7 @@ private:
|
||||
quint64 rounds, bool* ok, QString* errorString);
|
||||
|
||||
QList<Key*> m_keys;
|
||||
QList<ChallengeResponseKey*> m_challengeResponseKeys;
|
||||
};
|
||||
|
||||
#endif // KEEPASSX_COMPOSITEKEY_H
|
||||
|
||||
Reference in New Issue
Block a user