[users] Repair test after switch to yescrypt

This commit is contained in:
Adriaan de Groot 2024-07-03 23:02:37 +02:00
parent 6988e093b3
commit e08bd744a8

View File

@ -36,14 +36,14 @@ void
PasswordTests::testSalt() PasswordTests::testSalt()
{ {
QString s = SetPasswordJob::make_salt( 8 ); QString s = SetPasswordJob::make_salt( 8 );
QCOMPARE( s.length(), 4 + 8 ); // 8 salt chars, plus $6$, plus trailing $ QCOMPARE( s.length(), 4 + 8 ); // 8 salt chars, plus $y$, plus trailing $
QVERIFY( s.startsWith( "$6$" ) ); QVERIFY( s.startsWith( "$y$" ) );
QVERIFY( s.endsWith( '$' ) ); QVERIFY( s.endsWith( '$' ) );
qDebug() << "Obtained salt" << s; qDebug() << "Obtained salt" << s;
s = SetPasswordJob::make_salt( 11 ); s = SetPasswordJob::make_salt( 11 );
QCOMPARE( s.length(), 4 + 11 ); QCOMPARE( s.length(), 4 + 11 );
QVERIFY( s.startsWith( "$6$" ) ); QVERIFY( s.startsWith( "$y$" ) );
QVERIFY( s.endsWith( '$' ) ); QVERIFY( s.endsWith( '$' ) );
qDebug() << "Obtained salt" << s; qDebug() << "Obtained salt" << s;
} }