UI for setting and entering the password that encrypts the database key.

This commit is contained in:
akwizgran
2013-04-16 14:49:14 +01:00
parent e343c9f4bb
commit 374bff2fb6
16 changed files with 328 additions and 87 deletions

View File

@@ -8,6 +8,7 @@ public class TestDatabaseConfig implements DatabaseConfig {
private final File dir;
private final long maxSize;
private volatile byte[] key = new byte[] { 'f', 'o', 'o' };
public TestDatabaseConfig(File dir, long maxSize) {
this.dir = dir;
@@ -22,8 +23,12 @@ public class TestDatabaseConfig implements DatabaseConfig {
return dir;
}
public char[] getPassword() {
return "foo bar".toCharArray();
public void setEncryptionKey(byte[] key) {
this.key = key;
}
public byte[] getEncryptionKey() {
return key;
}
public long getMaxSize() {