Quote Originally Posted by d_stranz View Post
Network byte order is big-endian. Android is little-endian, so it is possible that your hash() call is generating a little-endian QByteArray. So try this:

Qt Code:
  1. #include <QtEndian>
  2.  
  3. QByteArray AndroidTemp = QMessageAuthenticationCode::hash(StringToSign, SecretKey, QCryptographicHash::Sha1);
  4. QByteArray AndroidString = AndroidTemp.toBase64(); // for comparison purposes
  5.  
  6. QByteArray SignTemp( AndroidString ); // copy so the two arrays are the same size
  7. qToBigEndian( &AndroidTemp, AndroidTemp.size(), &SignTemp );
  8.  
  9. QByteArray SignString = SignTemp.toBase64();
To copy to clipboard, switch view to plain text mode 

Are SignString and AndroidString the same? If so, then hash() is generating a big-endian array. If not, then it is probably little-endian.
Try sending this version of SignString to AWS
thank you for your reply - turned out my issue with signature was caused by the double slashes in StringToSign so replacing \\n with \n solved it - I am not getting any more errors but m_reply->readAll() now returns an empty string, no errors are reported by errorOccurred signal and nothing gets posted to s3. so not sure what is wrong now