mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-11-04 11:06:44 +00:00
export max keystore label length
This commit is contained in:
parent
3e91bdb46c
commit
93d494fcde
1 changed files with 2 additions and 1 deletions
|
@ -10,6 +10,7 @@ import java.util.List;
|
||||||
|
|
||||||
public class Keystore {
|
public class Keystore {
|
||||||
public static final String DEFAULT_LABEL = "Keystore 1";
|
public static final String DEFAULT_LABEL = "Keystore 1";
|
||||||
|
public static final int MAX_LABEL_LENGTH = 16;
|
||||||
|
|
||||||
private String label;
|
private String label;
|
||||||
private KeystoreSource source = KeystoreSource.SW_WATCH;
|
private KeystoreSource source = KeystoreSource.SW_WATCH;
|
||||||
|
@ -164,7 +165,7 @@ public class Keystore {
|
||||||
throw new InvalidKeystoreException("Label too short");
|
throw new InvalidKeystoreException("Label too short");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(label.replace(" ", "").length() > 16) {
|
if(label.replace(" ", "").length() > MAX_LABEL_LENGTH) {
|
||||||
throw new InvalidKeystoreException("Label too long");
|
throw new InvalidKeystoreException("Label too long");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue