0

im writing a Qt application on linux (Qt 4.8.1) which writes data byte by byte to a QDataStream object. The data stream goes into a file. Now i need to encrypt this data with AES-256. I choose crypto++ lib for this purpose but im struggling with the implementation.

Does anybody know if it is possible at all to encrypt a QDataStream with the given filter classes of crypto++ lib?

greetz maggie

4

1 回答 1

1

重新实现 QIODevice 或更好的 QFile 可能会很有趣......特别是我会重新实现:

virtual qint64 readData(char* data, qint64 maxSize) = 0;
virtual qint64 readLineData(char* data, qint64 maxSize);
virtual qint64 writeData(const char* data, qint64 maxSize) = 0;

这样,您应该能够透明地使用 QDataStream。

于 2012-07-05T18:30:27.497 回答