Better variable names.

This commit is contained in:
akwizgran
2015-12-18 12:25:07 +00:00
parent a3ecd93999
commit 6fab0e87e0

View File

@@ -94,16 +94,16 @@ class CryptoComponentImpl implements CryptoComponent {
private final KeyParser agreementKeyParser, signatureKeyParser; private final KeyParser agreementKeyParser, signatureKeyParser;
@Inject @Inject
CryptoComponentImpl(SeedProvider r) { CryptoComponentImpl(SeedProvider seedProvider) {
if (!FortunaSecureRandom.selfTest()) throw new RuntimeException(); if (!FortunaSecureRandom.selfTest()) throw new RuntimeException();
SecureRandom secureRandom1 = new SecureRandom(); SecureRandom platformSecureRandom = new SecureRandom();
if (LOG.isLoggable(INFO)) { if (LOG.isLoggable(INFO)) {
String provider = secureRandom1.getProvider().getName(); String provider = platformSecureRandom.getProvider().getName();
String algorithm = secureRandom1.getAlgorithm(); String algorithm = platformSecureRandom.getAlgorithm();
LOG.info("Default SecureRandom: " + provider + " " + algorithm); LOG.info("Default SecureRandom: " + provider + " " + algorithm);
} }
SecureRandom secureRandom2 = new FortunaSecureRandom(r.getSeed()); SecureRandom fortuna = new FortunaSecureRandom(seedProvider.getSeed());
secureRandom = new CombinedSecureRandom(secureRandom1, secureRandom2); secureRandom = new CombinedSecureRandom(platformSecureRandom, fortuna);
ECKeyGenerationParameters params = new ECKeyGenerationParameters( ECKeyGenerationParameters params = new ECKeyGenerationParameters(
PARAMETERS, secureRandom); PARAMETERS, secureRandom);
agreementKeyPairGenerator = new ECKeyPairGenerator(); agreementKeyPairGenerator = new ECKeyPairGenerator();