From e66cd22fea7a934b6d38caac7949d3507c4e8c02 Mon Sep 17 00:00:00 2001 From: Cody Constine Date: Wed, 11 Dec 2024 15:47:44 -0700 Subject: [PATCH] Adding encrypted version of ClientSideKeypairStore --- .../shared/store/reader/RotatingClientSideKeypairStore.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/uid2/shared/store/reader/RotatingClientSideKeypairStore.java b/src/main/java/com/uid2/shared/store/reader/RotatingClientSideKeypairStore.java index 148538a3..43bf9b17 100644 --- a/src/main/java/com/uid2/shared/store/reader/RotatingClientSideKeypairStore.java +++ b/src/main/java/com/uid2/shared/store/reader/RotatingClientSideKeypairStore.java @@ -3,6 +3,7 @@ import com.uid2.shared.cloud.DownloadCloudStorage; import com.uid2.shared.model.ClientSideKeypair; import com.uid2.shared.store.CloudPath; +import com.uid2.shared.store.EncryptedScopedStoreReader; import com.uid2.shared.store.IClientSideKeypairStore; import com.uid2.shared.store.ScopedStoreReader; import com.uid2.shared.store.parser.ClientSideKeypairParser; @@ -19,6 +20,10 @@ public RotatingClientSideKeypairStore(DownloadCloudStorage fileStreamProvider, S this.reader = new ScopedStoreReader<>(fileStreamProvider, scope, new ClientSideKeypairParser(), "client_side_keypairs"); } + public RotatingClientSideKeypairStore(DownloadCloudStorage fileStreamProvider, StoreScope scope, RotatingCloudEncryptionKeyProvider cloudEncryptionKeyProvider) { + this.reader = new EncryptedScopedStoreReader<>(fileStreamProvider, scope, new ClientSideKeypairParser(), "client_side_keypairs", cloudEncryptionKeyProvider); + } + @Override public long getVersion(JsonObject metadata) { return metadata.getLong("version");