mirror of
https://github.com/itay-grudev/SingleApplication.git
synced 2024-11-15 12:15:43 +08:00
SingleApplicationPrivate: Use MD5 on macOS for block server name
Maximum key size on macOS is PSHMNAMLEN (31). Fixes #178
This commit is contained in:
parent
c6519b6902
commit
f6375b10d0
@ -131,7 +131,12 @@ QString SingleApplicationPrivate::getUsername()
|
||||
|
||||
void SingleApplicationPrivate::genBlockServerName()
|
||||
{
|
||||
#ifdef Q_OS_MACOS
|
||||
// Maximum key size on macOS is PSHMNAMLEN (31).
|
||||
QCryptographicHash appData( QCryptographicHash::Md5 );
|
||||
#else
|
||||
QCryptographicHash appData( QCryptographicHash::Sha256 );
|
||||
#endif
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 3, 0)
|
||||
appData.addData( "SingleApplication", 17 );
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user