mirror of
https://github.com/google/nomulus.git
synced 2025-05-16 09:27:16 +02: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:
parent
260a6fb23b
commit
8a8cd9f0d2
7 changed files with 388 additions and 271 deletions
|
@ -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"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue