1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-26 14:22:05 +01:00

Simplify integrity protection assignment of resultBuilder

This commit is contained in:
Paul Schaub 2020-01-10 18:31:27 +01:00
parent dd976b7319
commit 2902c81b6c
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -191,13 +191,7 @@ public final class DecryptionStreamFactory {
LOGGER.log(LEVEL, "Message is encrypted using " + symmetricKeyAlgorithm); LOGGER.log(LEVEL, "Message is encrypted using " + symmetricKeyAlgorithm);
resultBuilder.setSymmetricKeyAlgorithm(symmetricKeyAlgorithm); resultBuilder.setSymmetricKeyAlgorithm(symmetricKeyAlgorithm);
if (encryptedSessionKey.isIntegrityProtected()) { resultBuilder.setIntegrityProtected(encryptedSessionKey.isIntegrityProtected());
LOGGER.log(LEVEL, "Message is integrity protected");
resultBuilder.setIntegrityProtected(true);
} else {
LOGGER.log(LEVEL, "Message is not integrity protected");
resultBuilder.setIntegrityProtected(false);
}
return encryptedSessionKey.getDataStream(keyDecryptor); return encryptedSessionKey.getDataStream(keyDecryptor);
} }