Skip to content

Commit

Permalink
Switch back to QByteArray for old qt6 version in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mnutt committed Jul 9, 2024
1 parent b58e0de commit 1e14235
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/WebCore/PAL/pal/crypto/qt/CryptoDigestQt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ std::unique_ptr<CryptoDigest> CryptoDigest::create(CryptoDigest::Algorithm algor

void CryptoDigest::addBytes(std::span<const uint8_t> input)
{
m_context->hash.addData(QByteArrayView(input.data(), input.size()));
m_context->hash.addData(QByteArray(reinterpret_cast<const char*>(input.data()), static_cast<qsizetype>(input.size())));
}

Vector<uint8_t> CryptoDigest::computeHash()
Expand All @@ -92,7 +92,7 @@ Vector<uint8_t> CryptoDigest::computeHash()
std::optional<Vector<uint8_t>> CryptoDigest::computeHash(Algorithm algorithm, const Vector<uint8_t>& input, UseCryptoKit)
{
QCryptographicHash hash(toQtAlgorithm(algorithm));
hash.addData(QByteArrayView(input.span().data(), input.span().size()));
hash.addData(QByteArray(reinterpret_cast<const char*>(input.span().data()), static_cast<qsizetype>(input.span().size())));
QByteArray digest = hash.result();

return Vector<uint8_t>(std::span { reinterpret_cast<const uint8_t*>(digest.constData()), static_cast<size_t>(digest.size()) });
Expand Down

0 comments on commit 1e14235

Please sign in to comment.