Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
Description
See epic for context.
The goal here is to get efficiency on par with the underlying C APIs.
We already have resultView(), but this has two problems:
- holds the data in an internal buffer from which it needs to be copied by the user to persistent storage before the QCH object is destroyed
- in particular, and this is the second point, it doesn't work for the static hash() short-cut
- the internal buffer doesn't survive the function call, so we need to return by QByteArray
The idea of -Into() is to bypass the internal buffer and use a user-provided one.
Acceptance criteria:
- hash() and result() have -Into() versions that allow the user to pass a destination buffer
- as QByteArray*
- as QSpan<std::byte> / QMutableByteArrayView (both would need to be written first)
- hashInto() does not copy the result
- doesn't use Private::result at all
Attachments
Issue Links
- is required for
-
QTBUG-111680 Add QMessageAuthenticationCode::{hash,result}Into()
-
- Open
-