mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-15 14:32:49 +00:00
Support an arbitrary number of digits
This commit is contained in:
parent
4cf1a5efe4
commit
066a7447c0
4 changed files with 13 additions and 24 deletions
|
@ -78,7 +78,8 @@ public abstract class OtpInfo implements Serializable {
|
|||
}
|
||||
|
||||
public static boolean isDigitsValid(int digits) {
|
||||
return digits == 6 || digits == 8;
|
||||
// allow a max of 10 digits, as truncation will only extract 31 bits
|
||||
return digits > 0 && digits <= 10;
|
||||
}
|
||||
|
||||
public void setDigits(int digits) throws OtpInfoException {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue