mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-03 20:47:37 +03:00
Write the remaining buffer in reset().
This commit is contained in:
parent
c2bdfab158
commit
36d974649e
2 changed files with 11 additions and 3 deletions
|
@ -59,21 +59,21 @@ void TestSymmetricCipher::testAes256CbcEncryption()
|
|||
buffer.open(QIODevice::WriteOnly);
|
||||
stream.open(QIODevice::WriteOnly);
|
||||
|
||||
QVERIFY(stream.reset());
|
||||
buffer.reset();
|
||||
buffer.buffer().clear();
|
||||
stream.reset();
|
||||
stream.write(plainText.left(16));
|
||||
QCOMPARE(QString(buffer.data().toHex()), QString(cipherText.left(16).toHex()));
|
||||
|
||||
QVERIFY(stream.reset());
|
||||
buffer.reset();
|
||||
buffer.buffer().clear();
|
||||
stream.reset();
|
||||
stream.write(plainText.left(10));
|
||||
QCOMPARE(QString(buffer.data().toHex()), QString());
|
||||
|
||||
QVERIFY(stream.reset());
|
||||
buffer.reset();
|
||||
buffer.buffer().clear();
|
||||
stream.reset();
|
||||
stream.write(plainText.left(10));
|
||||
stream.close();
|
||||
QCOMPARE(buffer.data().size(), 16);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue