diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyProvider.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyProvider.java
index 62cc3818eb1..5d670e58810 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyProvider.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyProvider.java
@@ -38,6 +38,7 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
import javax.crypto.KeyGenerator;
@@ -53,11 +54,13 @@ import javax.crypto.KeyGenerator;
@InterfaceStability.Unstable
public abstract class KeyProvider {
public static final String DEFAULT_CIPHER_NAME =
- "hadoop.security.key.default.cipher";
- public static final String DEFAULT_CIPHER = "AES/CTR/NoPadding";
+ CommonConfigurationKeysPublic.HADOOP_SECURITY_KEY_DEFAULT_CIPHER_KEY;
+ public static final String DEFAULT_CIPHER =
+ CommonConfigurationKeysPublic.HADOOP_SECURITY_KEY_DEFAULT_CIPHER_DEFAULT;
public static final String DEFAULT_BITLENGTH_NAME =
- "hadoop.security.key.default.bitlength";
- public static final int DEFAULT_BITLENGTH = 128;
+ CommonConfigurationKeysPublic.HADOOP_SECURITY_KEY_DEFAULT_BITLENGTH_KEY;
+ public static final int DEFAULT_BITLENGTH = CommonConfigurationKeysPublic.
+ HADOOP_SECURITY_KEY_DEFAULT_BITLENGTH_DEFAULT;
private final Configuration conf;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java
index bbc892ce228..8cd753ab064 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java
@@ -678,6 +678,27 @@ public class CommonConfigurationKeysPublic {
public static final String HADOOP_SECURITY_KEY_PROVIDER_PATH =
"hadoop.security.key.provider.path";
+ /**
+ * @see
+ *
+ * core-default.xml
+ */
+ public static final String HADOOP_SECURITY_KEY_DEFAULT_BITLENGTH_KEY =
+ "hadoop.security.key.default.bitlength";
+ /** Defalt value for HADOOP_SECURITY_KEY_DEFAULT_BITLENGTH_KEY. */
+ public static final int HADOOP_SECURITY_KEY_DEFAULT_BITLENGTH_DEFAULT = 128;
+
+ /**
+ * @see
+ *
+ * core-default.xml
+ */
+ public static final String HADOOP_SECURITY_KEY_DEFAULT_CIPHER_KEY =
+ "hadoop.security.key.default.cipher";
+ /** Defalt value for HADOOP_SECURITY_KEY_DEFAULT_CIPHER_KEY. */
+ public static final String HADOOP_SECURITY_KEY_DEFAULT_CIPHER_DEFAULT =
+ "AES/CTR/NoPadding";
+
//
/**
* @see