Implement storage service protocol changes.

This commit is contained in:
Greyson Parrelli
2020-02-28 13:21:36 -05:00
parent d3b123f3a9
commit 75a52f801a
9 changed files with 108 additions and 15 deletions

View File

@@ -32,6 +32,12 @@ public class StorageServiceValues {
return new MasterKey(blob);
}
public synchronized void rotateStorageMasterKey() {
store.beginWrite()
.putBlob(STORAGE_MASTER_KEY, MasterKey.createNew(new SecureRandom()).serialize())
.commit();
}
public boolean hasFirstStorageSyncCompleted() {
return !FeatureFlags.storageServiceRestore() || store.getBoolean(FIRST_STORAGE_SYNC_COMPLETED, true);
}