diff --git a/src/corelib/doc/snippets/qmessageauthenticationcode/main.cpp b/src/corelib/doc/snippets/qmessageauthenticationcode/main.cpp index 530f93cdd56..21c55568cac 100644 --- a/src/corelib/doc/snippets/qmessageauthenticationcode/main.cpp +++ b/src/corelib/doc/snippets/qmessageauthenticationcode/main.cpp @@ -14,12 +14,12 @@ int main(int argc, char *argv[]) //! [0] //! [1] - QMessageAuthenticationCode code(QCryptographicHash::Sha1, key); + QMessageAuthenticationCode code(QCryptographicHash::Sha256, key); code.addData(message); - code.result().toHex(); // returns "de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9" + code.result().toHex(); // returns "f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8" //! [1] //! [2] - QMessageAuthenticationCode::hash(message, key, QCryptographicHash::Sha1).toHex(); + QMessageAuthenticationCode::hash(message, key, QCryptographicHash::Sha256).toHex(); //! [2] }