Skip to content

Commit 26c189a

Browse files
author
wenwj0
committed
HBASE-27089 Add “commons.crypto.stream.buffer.size” configuration
1 parent 6792287 commit 26c189a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hbase-common/src/main/java/org/apache/hadoop/hbase/io/crypto/aes/CommonsCryptoAES.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import java.util.Properties;
2727
import javax.crypto.spec.SecretKeySpec;
2828
import org.apache.commons.crypto.cipher.CryptoCipherFactory;
29+
import org.apache.commons.crypto.stream.CryptoInputStream;
2930
import org.apache.hadoop.conf.Configuration;
3031
import org.apache.hadoop.hbase.io.crypto.Cipher;
3132
import org.apache.hadoop.hbase.io.crypto.CipherProvider;
@@ -48,6 +49,7 @@ public class CommonsCryptoAES extends Cipher {
4849
public static final String CIPHER_MODE_KEY = "hbase.crypto.commons.mode";
4950
public static final String CIPHER_CLASSES_KEY = "hbase.crypto.commons.cipher.classes";
5051
public static final String CIPHER_JCE_PROVIDER_KEY = "hbase.crypto.commons.cipher.jce.provider";
52+
public static final String CRYPTOSTREAM_BUFFERSIZE_KEY = "hbase.crypto.commons.cryptoStream.bufferSize";
5153

5254
private final String cipherMode;
5355
private Properties props;
@@ -81,6 +83,7 @@ private static Properties readCryptoProps(Configuration conf) {
8183

8284
props.setProperty(CryptoCipherFactory.CLASSES_KEY, conf.get(CIPHER_CLASSES_KEY, ""));
8385
props.setProperty(CryptoCipherFactory.JCE_PROVIDER_KEY, conf.get(CIPHER_JCE_PROVIDER_KEY, ""));
86+
props.setProperty(CryptoInputStream.STREAM_BUFFER_SIZE_KEY, conf.get(CRYPTOSTREAM_BUFFERSIZE_KEY, ""));
8487

8588
return props;
8689
}

0 commit comments

Comments
 (0)