QMessageAuthenticationCode: remove Private::method
...it's the same as messageHash.method, so we don't need to store it twice. Pick-to: 6.5 Change-Id: I926dbfa177c25e9bc3ebed9149da5ce8bad8cf2f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
57a7db746a
commit
ed604ce101
@ -1303,14 +1303,13 @@ class QMessageAuthenticationCodePrivate
|
||||
{
|
||||
public:
|
||||
QMessageAuthenticationCodePrivate(QCryptographicHash::Algorithm m)
|
||||
: messageHash(m), method(m)
|
||||
: messageHash(m)
|
||||
{
|
||||
}
|
||||
|
||||
HashBlock key;
|
||||
HashResult result;
|
||||
QCryptographicHashPrivate messageHash;
|
||||
const QCryptographicHash::Algorithm method;
|
||||
|
||||
void setKey(QByteArrayView k) noexcept;
|
||||
void initMessageHash() noexcept;
|
||||
@ -1333,7 +1332,7 @@ public:
|
||||
*/
|
||||
void QMessageAuthenticationCodePrivate::setKey(QByteArrayView newKey) noexcept
|
||||
{
|
||||
const int blockSize = qt_hash_block_size(method);
|
||||
const int blockSize = qt_hash_block_size(messageHash.method);
|
||||
|
||||
if (newKey.size() > blockSize) {
|
||||
messageHash.addData(newKey);
|
||||
|
Loading…
x
Reference in New Issue
Block a user