mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-31 12:00:16 -07:00
Merge pull request #9942 from Chocobo1/pbkdf2
Do password hashing properly
This commit is contained in:
commit
6bb4eb825b
21 changed files with 367 additions and 137 deletions
|
@ -30,10 +30,9 @@
|
|||
#ifndef UTILS_STRING_H
|
||||
#define UTILS_STRING_H
|
||||
|
||||
#include <QLatin1String>
|
||||
#include <QString>
|
||||
|
||||
class QByteArray;
|
||||
class QLatin1String;
|
||||
class TriStateBool;
|
||||
|
||||
namespace Utils
|
||||
|
@ -42,10 +41,6 @@ namespace Utils
|
|||
{
|
||||
QString fromDouble(double n, int precision);
|
||||
|
||||
// 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);
|
||||
|
||||
int naturalCompare(const QString &left, const QString &right, const Qt::CaseSensitivity caseSensitivity);
|
||||
template <Qt::CaseSensitivity caseSensitivity>
|
||||
bool naturalLessThan(const QString &left, const QString &right)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue