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 a8e1d1a commit ba015ae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class AesCbcPkcs5PaddingEncryptor extends BaseJavaEncryptor {
private final static String ALGORITHM_NAME = "AES/CBC/PKCS5Padding";

public AesCbcPkcs5PaddingEncryptor() {
super("AES", ALGORITHM_NAME, 16, IvParameterSpec::new);
super(ALGORITHM_NAME, "AES", 16, IvParameterSpec::new);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class AesGcmNoPaddingEncryptor extends BaseJavaEncryptor {
private static final String ALGORITHM_NAME = "AES/GCM/NoPadding";

public AesGcmNoPaddingEncryptor() {
super("AES", ALGORITHM_NAME, 16, iv -> new GCMParameterSpec(128, iv));
super(ALGORITHM_NAME, "AES", 16, iv -> new GCMParameterSpec(128, iv));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public abstract class BaseJavaEncryptor implements Encryptor {
private final int ivLength;
private final Function<byte[], AlgorithmParameterSpec> algorithmParameterSpecSupplier;

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

0 comments on commit ba015ae

Please sign in to comment.