mirror of
https://github.com/google/nomulus
synced 2026-02-11 07:11:40 +00:00
Move the RDE encryption to a dedicated file
Merges the encryptor creation between RyDE and Ghostryde. The new file - RydeEncryption.java - is a merge of the removed functions in Ghostryde.java and the RydePgpEncryptionOutputStream.java. This is one of a series of CLs - each merging a single "part" of the encoding. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=205246053
This commit is contained in:
@@ -16,6 +16,8 @@ package google.registry.rde;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static google.registry.rde.RydeCompression.openCompressor;
|
||||
import static google.registry.rde.RydeEncryption.RYDE_USE_INTEGRITY_PACKET;
|
||||
import static google.registry.rde.RydeEncryption.openEncryptor;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.io.Closer;
|
||||
@@ -69,7 +71,7 @@ public final class RydeEncoder extends FilterOutputStream {
|
||||
super(null);
|
||||
this.sigOutput = sigOutput;
|
||||
signer = closer.register(new RydePgpSigningOutputStream(checkNotNull(rydeOutput), signingKey));
|
||||
encryptLayer = closer.register(new RydePgpEncryptionOutputStream(signer, receiverKeys));
|
||||
encryptLayer = closer.register(openEncryptor(signer, RYDE_USE_INTEGRITY_PACKET, receiverKeys));
|
||||
kompressor = closer.register(openCompressor(encryptLayer));
|
||||
fileLayer =
|
||||
closer.register(new RydePgpFileOutputStream(kompressor, modified, filenamePrefix + ".tar"));
|
||||
|
||||
Reference in New Issue
Block a user