Encrypt persisted data using password protected symmetric key (#279)

This commit is contained in:
duriancrepe 2022-04-12 04:49:30 -07:00 committed by GitHub
parent 75c66ee43f
commit 5b38eab716
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 254 additions and 169 deletions

View file

@ -6,6 +6,8 @@ import bisq.core.trade.TradableList;
import bisq.network.p2p.P2PService;
import bisq.network.p2p.peers.PeerManager;
import bisq.common.crypto.KeyRing;
import bisq.common.crypto.KeyStorage;
import bisq.common.file.CorruptedStorageFileHandler;
import bisq.common.handlers.ErrorMessageHandler;
import bisq.common.handlers.ResultHandler;
@ -34,8 +36,9 @@ public class OpenOfferManagerTest {
public void setUp() throws Exception {
var corruptedStorageFileHandler = mock(CorruptedStorageFileHandler.class);
var storageDir = Files.createTempDirectory("storage").toFile();
persistenceManager = new PersistenceManager<>(storageDir, null, corruptedStorageFileHandler);
signedOfferPersistenceManager = new PersistenceManager<>(storageDir, null, corruptedStorageFileHandler);
var keyRing = new KeyRing(new KeyStorage(storageDir));
persistenceManager = new PersistenceManager<>(storageDir, null, corruptedStorageFileHandler, keyRing);
signedOfferPersistenceManager = new PersistenceManager<>(storageDir, null, corruptedStorageFileHandler, keyRing);
coreContext = new CoreContext();
}