Skip to content

Commit

Permalink
Adding encrypted version of ClientSideKeypairStore
Browse files Browse the repository at this point in the history
  • Loading branch information
cody-constine-ttd committed Dec 11, 2024
1 parent 65abd71 commit e66cd22
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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");
Expand Down

0 comments on commit e66cd22

Please sign in to comment.