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

SHA3_256 fails when input data is bigger than 256M

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.12.0
    • Core: Other
    • None
    • Windows

    Description

       

      // code placeholder
      TestResult calc_qt_sha3_256(char const* data, int len)
      {
          QTime t1 = QTime::currentTime();
          QCryptographicHash hash(QCryptographicHash::Sha3_256);
          hash.addData(data, len);
          QTime t2 = QTime::currentTime();
          TestResult res;
          res.sha = hash.result().toHex().toUpper();
          res.length = len;
          res.time = t1.msecsTo(t2);
          return res;
      }
      

      as codes above,

      when len < 256MB, the result is correct.

      when 256M < len < 512M, the app will be broken.

      when 512M < len , it works but the result is wrong.

       

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              thiago Thiago Macieira
              saintown saintown
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes