Skip to content

Commit

Permalink
Added more work
Browse files Browse the repository at this point in the history
  • Loading branch information
cody-constine-ttd committed Dec 6, 2024
1 parent 7fe538c commit 3a808a2
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
import com.uid2.shared.model.CloudEncryptionKey;
import com.uid2.shared.store.reader.RotatingCloudEncryptionKeyProvider;

import com.uid2.shared.store.reader.StoreReader;
import io.vertx.core.json.JsonObject;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.Collection;

public class RotatingEncryptedSaltProvider extends RotatingSaltProvider{
public class RotatingEncryptedSaltProvider extends RotatingSaltProvider implements StoreReader<Collection<RotatingSaltProvider.SaltSnapshot>> {
private final RotatingCloudEncryptionKeyProvider cloudEncryptionKeyProvider;

public RotatingEncryptedSaltProvider(DownloadCloudStorage fileStreamProvider, String metadataPath, RotatingCloudEncryptionKeyProvider cloudEncryptionKeyProvider) {
Expand All @@ -38,4 +40,9 @@ protected String readInputStream(InputStream inputStream) throws IOException {

return new String(decryptedBytes, StandardCharsets.UTF_8);
}

@Override
public Collection<SaltSnapshot> getAll() {
return super.getSnapshots();
}
}

0 comments on commit 3a808a2

Please sign in to comment.