Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAFKA-18374 Remove unused EncryptingPasswordEncoder #18355

Merged
merged 2 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,8 @@
import org.apache.kafka.common.config.types.Password;

import java.security.GeneralSecurityException;
import java.util.Base64;

public interface PasswordEncoder {

String KEY_FACTORY_ALGORITHM = "keyFactoryAlgorithm";
String CIPHER_ALGORITHM = "cipherAlgorithm";
String INITIALIZATION_VECTOR = "initializationVector";
String KEY_LENGTH = "keyLength";
String SALT = "salt";
String ITERATIONS = "iterations";
String ENCRYPTED_PASSWORD = "encryptedPassword";
String PASSWORD_LENGTH = "passwordLength";

/**
* A password encoder that does not modify the given password. This is used in KRaft mode only.
*/
Expand All @@ -48,22 +37,6 @@ public Password decode(String encodedPassword) {
}
};

static byte[] base64Decode(String encoded) {
return Base64.getDecoder().decode(encoded);
}

static String base64Encode(byte[] bytes) {
return Base64.getEncoder().encodeToString(bytes);
}

static EncryptingPasswordEncoder encrypting(Password secret,
String keyFactoryAlgorithm,
String cipherAlgorithm,
int keyLength,
int iterations) {
return new EncryptingPasswordEncoder(secret, keyFactoryAlgorithm, cipherAlgorithm, keyLength, iterations);
}

String encode(Password password) throws GeneralSecurityException;
Password decode(String encodedPassword) throws GeneralSecurityException;
}
Loading