Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-125431

Add QCryptographicHash::hashInto(QSpan<std::byte>)

XMLWordPrintable

    • 5
    • c70c81b37 (dev), fa8256bb5 (dev), 2b6a77cd1 (dev)
    • Foundation Sprint 108

      Until now, QCryptographicHash had a big drawback over the underlying C APIs: at least one extra memory allocation. Either you created a QCryptographicHash object (allocates a Private), and enjoy noexcept addData() and resultView(), or you used the static hash() function (which creates a Private on the stack, so doesn't need to allocate it), but then we needed to return in an owning container.

      Provide a hashInto() static function that can use the same Private-on-the-stack optimization that hash() has, but allows the user to pass a buffer to write into. This would be noexcept and could match the speed of the underlying C APIs.

      Ditto QMessageAuthenticationCode.

        For Gerrit Dashboard: QTBUG-125431
        # Subject Branch Project Status CR V

            mmutz Marc Mutz
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes