Revision 72d577fb app/src/info/guardianproject/notepadbot/NConstants.java
app/src/info/guardianproject/notepadbot/NConstants.java | ||
---|---|---|
5 | 5 |
|
6 | 6 |
public static final String TAG = "NoteCipher"; |
7 | 7 |
public static final int MAX_STREAM_SIZE = 1000000; |
8 |
public static final int MIN_PASS_LENGTH = 8; |
|
9 |
// public final static int MAX_PASS_ATTEMPTS = 3; |
|
10 |
// public final static int PASS_RETRY_WAIT_TIMEOUT = 30000; |
|
11 |
|
|
12 |
/** |
|
13 |
* Checks if the password is valid based on it's length |
|
14 |
* @param pass |
|
15 |
* @return True if the password is a valid one, false otherwise |
|
16 |
*/ |
|
17 |
public static final boolean validatePassword(char[] pass) { |
|
18 |
if (pass.length < NConstants.MIN_PASS_LENGTH) { |
|
19 |
return false; |
|
20 |
} |
|
21 |
return true; |
|
22 |
} |
|
8 | 23 |
} |
Also available in: Unified diff