-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a min length of 6 for new PIN reminders.
- Loading branch information
1 parent
dcb5f7b
commit 81532ca
Showing
5 changed files
with
14 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 7 additions & 5 deletions
12
app/src/main/java/org/thoughtcrime/securesms/lock/v2/KbsConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
package org.thoughtcrime.securesms.lock.v2; | ||
|
||
import org.thoughtcrime.securesms.keyvalue.SignalStore; | ||
|
||
public final class KbsConstants { | ||
|
||
static final int MINIMUM_NEW_PIN_LENGTH = 6; | ||
public static final int MINIMUM_PIN_LENGTH = 6; | ||
public static final int LEGACY_MINIMUM_PIN_LENGTH = 4; | ||
|
||
/** Migrated pins from V1 might be 4 */ | ||
public static final int MINIMUM_POSSIBLE_PIN_LENGTH = 4; | ||
private KbsConstants() { } | ||
|
||
private KbsConstants() { | ||
public static int minimumPossiblePinLength() { | ||
return SignalStore.kbsValues().hasMigratedToPinsForAll() ? MINIMUM_PIN_LENGTH : LEGACY_MINIMUM_PIN_LENGTH; | ||
} | ||
|
||
} |