mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 19:59:05 +01:00
Simpler password strength estimation.
This commit is contained in:
@@ -4,6 +4,7 @@ import org.briarproject.bramble.api.crypto.PasswordStrengthEstimator;
|
||||
import org.briarproject.bramble.test.BrambleTestCase;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.briarproject.bramble.api.crypto.PasswordStrengthEstimator.NONE;
|
||||
import static org.briarproject.bramble.api.crypto.PasswordStrengthEstimator.QUITE_STRONG;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@@ -12,7 +13,7 @@ public class PasswordStrengthEstimatorImplTest extends BrambleTestCase {
|
||||
@Test
|
||||
public void testWeakPasswords() {
|
||||
PasswordStrengthEstimator e = new PasswordStrengthEstimatorImpl();
|
||||
assertTrue(e.estimateStrength("") < QUITE_STRONG);
|
||||
assertTrue(e.estimateStrength("") == NONE);
|
||||
assertTrue(e.estimateStrength("password") < QUITE_STRONG);
|
||||
assertTrue(e.estimateStrength("letmein") < QUITE_STRONG);
|
||||
assertTrue(e.estimateStrength("123456") < QUITE_STRONG);
|
||||
|
||||
Reference in New Issue
Block a user