SymmetricCipher: Add keySize(), don't rely on state for sizes

This additionally makes keySize() and blockSize() work before
setting the key and IV. Required for SSH agent decryption.
This commit is contained in:
Toni Spets
2017-10-29 17:07:56 +02:00
parent a81a5fa31b
commit 248ae9d4ba
5 changed files with 28 additions and 11 deletions

View File

@@ -39,6 +39,7 @@ public:
Q_REQUIRED_RESULT bool processInPlace(QByteArray& data, quint64 rounds);
bool reset();
int keySize() const;
int blockSize() const;
QString errorString() const;
@@ -54,7 +55,6 @@ private:
const SymmetricCipher::Direction m_direction;
QByteArray m_key;
QByteArray m_iv;
int m_blockSize;
QString m_errorString;
};