mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-16 15:02:54 +00:00
Check whether the database has been loaded before trying to decrypt it
This commit is contained in:
parent
3e2bb5b0b3
commit
12dcf54cd3
1 changed files with 1 additions and 0 deletions
|
@ -29,6 +29,7 @@ public class DatabaseManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMasterKey(MasterKey key) throws Exception {
|
public void setMasterKey(MasterKey key) throws Exception {
|
||||||
|
assertLoaded();
|
||||||
byte[] encrypted = _file.getContent();
|
byte[] encrypted = _file.getContent();
|
||||||
CryptParameters params = _file.getCryptParameters();
|
CryptParameters params = _file.getCryptParameters();
|
||||||
CryptResult result = key.decrypt(encrypted, params);
|
CryptResult result = key.decrypt(encrypted, params);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue