mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-12-06 00:32:32 -08:00
Generalize group and entry add code.
This commit is contained in:
1 parent
31cf0bb1c9
commit
ae136fb816
13 files changed
+245
-227
No files matched your search
@@ -34,6 +34,8 @@ import com.keepassdroid.database.exception.InvalidKeyFileException;
|
||||
|
||||
public class PwDatabaseV4 extends PwDatabase {
|
||||
|
||||
public static final Date DEFAULT_NOW = new Date();
|
||||
|
||||
public UUID dataCipher;
|
||||
public PwCompressionAlgorithm compressionAlgorithm;
|
||||
public long numKeyEncRounds;
|
||||
@@ -153,4 +155,22 @@ public class PwDatabaseV4 extends PwDatabase {
|
||||
return PwEncryptionAlgorithm.Rjindal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PwGroupIdV4 newGroupId() {
|
||||
PwGroupIdV4 id = new PwGroupIdV4(UUID_ZERO);
|
||||
|
||||
while (true) {
|
||||
id = new PwGroupIdV4(UUID.randomUUID());
|
||||
|
||||
if (!isGroupIdUsed(id)) break;
|
||||
}
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PwGroup createGroup() {
|
||||
return new PwGroupV4();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user