|
|
|
@ -31,10 +31,8 @@
@@ -31,10 +31,8 @@
|
|
|
|
|
class QByteArray; |
|
|
|
|
class QString; |
|
|
|
|
|
|
|
|
|
namespace Utils |
|
|
|
|
namespace Utils::Password |
|
|
|
|
{ |
|
|
|
|
namespace Password |
|
|
|
|
{ |
|
|
|
|
// Implements constant-time comparison to protect against timing attacks
|
|
|
|
|
// Taken from https://crackstation.net/hashing-security.htm
|
|
|
|
|
bool slowEquals(const QByteArray &a, const QByteArray &b); |
|
|
|
@ -47,5 +45,4 @@ namespace Utils
@@ -47,5 +45,4 @@ namespace Utils
|
|
|
|
|
bool verify(const QByteArray &secret, const QString &password); |
|
|
|
|
bool verify(const QByteArray &secret, const QByteArray &password); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|