1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-23 12:52:07 +01:00

EncryptionOptions: Change return val of overrideEncryptionAlgorithm to EncryptionOptions

This commit is contained in:
Paul Schaub 2021-10-26 23:06:41 +02:00
parent 963a8170da
commit 3fd929916d
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -273,11 +273,12 @@ public class EncryptionOptions {
* *
* @param encryptionAlgorithm encryption algorithm override * @param encryptionAlgorithm encryption algorithm override
*/ */
public void overrideEncryptionAlgorithm(SymmetricKeyAlgorithm encryptionAlgorithm) { public EncryptionOptions overrideEncryptionAlgorithm(SymmetricKeyAlgorithm encryptionAlgorithm) {
if (encryptionAlgorithm == SymmetricKeyAlgorithm.NULL) { if (encryptionAlgorithm == SymmetricKeyAlgorithm.NULL) {
throw new IllegalArgumentException("Plaintext encryption can only be used to denote unencrypted secret keys."); throw new IllegalArgumentException("Plaintext encryption can only be used to denote unencrypted secret keys.");
} }
this.encryptionAlgorithmOverride = encryptionAlgorithm; this.encryptionAlgorithmOverride = encryptionAlgorithm;
return this;
} }
public interface EncryptionKeySelector { public interface EncryptionKeySelector {