mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 08:49:42 -05:00
Mark some constructor as explicit.
This commit is contained in:
parent
6422dee4fc
commit
279585fff4
@ -30,7 +30,7 @@ public:
|
||||
Sha256
|
||||
};
|
||||
|
||||
CryptoHash(CryptoHash::Algorithm algo);
|
||||
explicit CryptoHash(CryptoHash::Algorithm algo);
|
||||
~CryptoHash();
|
||||
void addData(const QByteArray& data);
|
||||
void reset();
|
||||
@ -40,7 +40,8 @@ public:
|
||||
|
||||
private:
|
||||
CryptoHashPrivate* const d_ptr;
|
||||
Q_DECLARE_PRIVATE(CryptoHash);
|
||||
|
||||
Q_DECLARE_PRIVATE(CryptoHash)
|
||||
};
|
||||
|
||||
#endif // KEEPASSX_CRYPTOHASH_H
|
||||
|
@ -55,8 +55,9 @@ public:
|
||||
int blockSize() const;
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(SymmetricCipher)
|
||||
SymmetricCipherBackend* m_backend;
|
||||
|
||||
Q_DISABLE_COPY(SymmetricCipher)
|
||||
};
|
||||
|
||||
#endif // KEEPASSX_SYMMETRICCIPHER_H
|
||||
|
@ -23,7 +23,7 @@
|
||||
class SymmetricCipherBackend
|
||||
{
|
||||
public:
|
||||
virtual ~SymmetricCipherBackend() {};
|
||||
virtual ~SymmetricCipherBackend() {}
|
||||
virtual void setAlgorithm(SymmetricCipher::Algorithm algo) = 0;
|
||||
virtual void setMode(SymmetricCipher::Mode mode) = 0;
|
||||
virtual void setDirection(SymmetricCipher::Direction direction) = 0;
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "crypto/CryptoHash.h"
|
||||
#include "format/KeePass2.h"
|
||||
|
||||
KeePass2RandomStream::KeePass2RandomStream(QByteArray key)
|
||||
KeePass2RandomStream::KeePass2RandomStream(const QByteArray& key)
|
||||
: m_cipher(SymmetricCipher::Salsa20, SymmetricCipher::Stream, SymmetricCipher::Encrypt,
|
||||
CryptoHash::hash(key, CryptoHash::Sha256), KeePass2::INNER_STREAM_SALSA20_IV)
|
||||
, m_offset(0)
|
||||
|
@ -25,7 +25,7 @@
|
||||
class KeePass2RandomStream
|
||||
{
|
||||
public:
|
||||
KeePass2RandomStream(QByteArray key);
|
||||
explicit KeePass2RandomStream(const QByteArray& key);
|
||||
QByteArray randomBytes(int size);
|
||||
QByteArray process(const QByteArray& data);
|
||||
void processInPlace(QByteArray& data);
|
||||
|
@ -27,7 +27,7 @@ class QIODevice;
|
||||
|
||||
class KeePass2Reader
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(KeePass2Reader);
|
||||
Q_DECLARE_TR_FUNCTIONS(KeePass2Reader)
|
||||
|
||||
public:
|
||||
KeePass2Reader();
|
||||
|
@ -35,7 +35,7 @@ class Metadata;
|
||||
|
||||
class KeePass2XmlReader
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(KeePass2XmlReader);
|
||||
Q_DECLARE_TR_FUNCTIONS(KeePass2XmlReader)
|
||||
|
||||
public:
|
||||
KeePass2XmlReader();
|
||||
|
@ -46,7 +46,7 @@ class DatabaseTabWidget : public QTabWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DatabaseTabWidget(QWidget* parent);
|
||||
explicit DatabaseTabWidget(QWidget* parent);
|
||||
void openDatabase(const QString& fileName);
|
||||
DatabaseWidget* currentDatabaseWidget();
|
||||
|
||||
|
@ -32,7 +32,7 @@ class EditGroupWidget : public QWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EditGroupWidget(QWidget* parent = 0);
|
||||
explicit EditGroupWidget(QWidget* parent = 0);
|
||||
~EditGroupWidget();
|
||||
|
||||
void loadGroup(Group* group, bool create);
|
||||
|
@ -26,7 +26,7 @@ class PasswordKey : public Key
|
||||
{
|
||||
public:
|
||||
PasswordKey();
|
||||
PasswordKey(const QString& password);
|
||||
explicit PasswordKey(const QString& password);
|
||||
QByteArray rawKey() const;
|
||||
void setPassword(const QString& password);
|
||||
PasswordKey* clone() const;
|
||||
|
Loading…
Reference in New Issue
Block a user