diff --git a/app/backend/nvpairingmanager.cpp b/app/backend/nvpairingmanager.cpp index a1a3dcdb..f6feb093 100644 --- a/app/backend/nvpairingmanager.cpp +++ b/app/backend/nvpairingmanager.cpp @@ -256,7 +256,9 @@ NvPairingManager::pair(QString appVersion, QString pin, QSslCertificate& serverC challengeResponse.append(reinterpret_cast(asnSignature->data), asnSignature->length); challengeResponse.append(clientSecretData); - QByteArray encryptedChallengeResponseHash = encrypt(QCryptographicHash::hash(challengeResponse, hashAlgo), &encKey); + QByteArray paddedHash = QCryptographicHash::hash(challengeResponse, hashAlgo); + paddedHash.resize(32); + QByteArray encryptedChallengeResponseHash = encrypt(paddedHash, &encKey); QString respXml = m_Http.openConnectionToString(m_Http.m_BaseUrlHttp, "pair", "devicename=roth&updateState=1&serverchallengeresp=" +