mirror of
https://github.com/google/nomulus.git
synced 2025-06-11 23:14:45 +02:00
Migrate to Flogger (green)
This is a 'green' Flogger migration CL. Green CLs are intended to be as safe as possible and should be easy to review and submit. No changes should be necessary to the code itself prior to submission, but small changes to BUILD files may be required. Changes within files are completely independent of each other, so this CL can be safely split up for review using tools such as Rosie. For more information, see [] Base CL: 197826149 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=198560170
This commit is contained in:
parent
0d2fb3a8f0
commit
70b13596e4
178 changed files with 984 additions and 988 deletions
|
@ -22,8 +22,8 @@ import static org.bouncycastle.bcpg.HashAlgorithmTags.SHA256;
|
|||
import static org.bouncycastle.bcpg.PublicKeyAlgorithmTags.RSA_GENERAL;
|
||||
import static org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags.AES_128;
|
||||
|
||||
import com.google.common.flogger.FluentLogger;
|
||||
import com.google.common.io.CharStreams;
|
||||
import com.google.common.logging.FormattingLogger;
|
||||
import google.registry.testing.BouncyCastleProviderRule;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
@ -120,7 +120,7 @@ public class BouncyCastleTest {
|
|||
+ "Be poet's or fanatic's will be known\n"
|
||||
+ "When this warm scribe my hand is in the grave.\n";
|
||||
|
||||
private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();
|
||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||
|
||||
@Rule
|
||||
public final BouncyCastleProviderRule bouncy = new BouncyCastleProviderRule();
|
||||
|
@ -136,7 +136,7 @@ public class BouncyCastleTest {
|
|||
}
|
||||
data = output.toByteArray();
|
||||
}
|
||||
logger.infofmt("Compressed data: %s", dumpHex(data));
|
||||
logger.atInfo().log("Compressed data: %s", dumpHex(data));
|
||||
|
||||
// Decompress the data.
|
||||
try (ByteArrayInputStream input = new ByteArrayInputStream(data)) {
|
||||
|
@ -167,7 +167,7 @@ public class BouncyCastleTest {
|
|||
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
||||
signer.generate().encode(output);
|
||||
byte[] signatureFileData = output.toByteArray();
|
||||
logger.infofmt(".sig file data: %s", dumpHex(signatureFileData));
|
||||
logger.atInfo().log(".sig file data: %s", dumpHex(signatureFileData));
|
||||
|
||||
// Load algorithm information and signature data from "signatureFileData".
|
||||
PGPSignature sig;
|
||||
|
@ -207,7 +207,7 @@ public class BouncyCastleTest {
|
|||
signer.update(FALL_OF_HYPERION_A_DREAM.getBytes(UTF_8));
|
||||
signer.generate().encode(output);
|
||||
byte[] signatureFileData = output.toByteArray();
|
||||
logger.infofmt(".sig file data: %s", dumpHex(signatureFileData));
|
||||
logger.atInfo().log(".sig file data: %s", dumpHex(signatureFileData));
|
||||
|
||||
// Load algorithm information and signature data from "signatureFileData".
|
||||
PGPSignature sig;
|
||||
|
@ -252,7 +252,7 @@ public class BouncyCastleTest {
|
|||
}
|
||||
encryptedData = output.toByteArray();
|
||||
}
|
||||
logger.infofmt("Encrypted data: %s", dumpHex(encryptedData));
|
||||
logger.atInfo().log("Encrypted data: %s", dumpHex(encryptedData));
|
||||
|
||||
// Bob loads his "privateKey" into memory.
|
||||
PGPSecretKeyRing privateKeyRing = new BcPGPSecretKeyRing(PRIVATE_KEY);
|
||||
|
@ -296,7 +296,7 @@ public class BouncyCastleTest {
|
|||
}
|
||||
encryptedData = output.toByteArray();
|
||||
}
|
||||
logger.infofmt("Encrypted data: %s", dumpHex(encryptedData));
|
||||
logger.atInfo().log("Encrypted data: %s", dumpHex(encryptedData));
|
||||
|
||||
// Bob loads his chain of private keys into memory.
|
||||
PGPSecretKeyRingCollection privateKeyRings = new BcPGPSecretKeyRingCollection(
|
||||
|
@ -344,7 +344,7 @@ public class BouncyCastleTest {
|
|||
}
|
||||
encryptedData = output.toByteArray();
|
||||
}
|
||||
logger.infofmt("Encrypted data: %s", dumpHex(encryptedData));
|
||||
logger.atInfo().log("Encrypted data: %s", dumpHex(encryptedData));
|
||||
|
||||
// Bob loads his chain of private keys into memory.
|
||||
PGPSecretKeyRingCollection privateKeyRings = new BcPGPSecretKeyRingCollection(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue