add LocalKeyStorage, don't store public keys larger than 50kb in database

This commit is contained in:
Vincent Breitmoser
2017-02-24 17:25:32 +01:00
parent 2bc05a2cd5
commit c7e01926e1
44 changed files with 314 additions and 150 deletions

View File

@@ -97,7 +97,7 @@ public class TestHelpers {
IteratorWithIOThrow<UncachedKeyRing> stream = UncachedKeyRing.fromStream(
getInstrumentation().getContext().getAssets().open(name));
DatabaseReadWriteInteractor helper = new DatabaseReadWriteInteractor(context);
DatabaseReadWriteInteractor helper = DatabaseReadWriteInteractor.createDatabaseReadWriteInteractor(context);
while(stream.hasNext()) {
UncachedKeyRing ring = stream.next();
if (ring.isSecret()) {

View File

@@ -37,7 +37,7 @@ public abstract class CustomActions {
public static ViewAction tokenEncryptViewAddToken(long keyId) throws Exception {
CanonicalizedPublicKeyRing ring =
new DatabaseReadWriteInteractor(getTargetContext()).getCanonicalizedPublicKeyRing(keyId);
DatabaseReadWriteInteractor.createDatabaseReadWriteInteractor(getTargetContext()).getCanonicalizedPublicKeyRing(keyId);
final Object item = new KeyAdapter.KeyItem(ring);
return new ViewAction() {