Skip to content

Commit

Permalink
Refactor constructor signature
Browse files Browse the repository at this point in the history
  • Loading branch information
mkay1375 committed Aug 4, 2024
1 parent ba015ae commit 0940976
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ public abstract class BaseJavaEncryptor implements Encryptor {

private static final SecureRandom SECURE_RANDOM = new SecureRandom();

private final String keyAlgorithmName;
private final String algorithmName;
private final String keyAlgorithmName;
private final int ivLength;
private final Function<byte[], AlgorithmParameterSpec> algorithmParameterSpecSupplier;

protected BaseJavaEncryptor(String algorithmName,
String keyAlgorithmName,
int ivLength,
Function<byte[], AlgorithmParameterSpec> algorithmParameterSpecSupplier) {
this.keyAlgorithmName = Objects.requireNonNull(keyAlgorithmName);
this.algorithmName = Objects.requireNonNull(algorithmName);
this.keyAlgorithmName = Objects.requireNonNull(keyAlgorithmName);
this.ivLength = ivLength;
this.algorithmParameterSpecSupplier = Objects.requireNonNull(algorithmParameterSpecSupplier);
}
Expand Down

0 comments on commit 0940976

Please sign in to comment.