public class CryptoStreamUtils
extends Object
Constructor and Description |
---|
CryptoStreamUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
COMMONS_CRYPTO_CONF_PREFIX() |
static java.io.InputStream |
createCryptoInputStream(java.io.InputStream is,
SparkConf sparkConf,
byte[] key)
Helper method to wrap
InputStream with CryptoInputStream for decryption. |
static java.io.OutputStream |
createCryptoOutputStream(java.io.OutputStream os,
SparkConf sparkConf,
byte[] key)
Helper method to wrap
OutputStream with CryptoOutputStream for encryption. |
static byte[] |
createKey(SparkConf conf)
Creates a new encryption key.
|
static int |
IV_LENGTH_IN_BYTES() |
static String |
SPARK_IO_ENCRYPTION_COMMONS_CONFIG_PREFIX() |
static java.util.Properties |
toCryptoConf(SparkConf conf)
Get Commons-crypto configurations from Spark configurations identified by prefix.
|
public static int IV_LENGTH_IN_BYTES()
public static String SPARK_IO_ENCRYPTION_COMMONS_CONFIG_PREFIX()
public static String COMMONS_CRYPTO_CONF_PREFIX()
public static java.io.OutputStream createCryptoOutputStream(java.io.OutputStream os, SparkConf sparkConf, byte[] key)
OutputStream
with CryptoOutputStream
for encryption.os
- (undocumented)sparkConf
- (undocumented)key
- (undocumented)public static java.io.InputStream createCryptoInputStream(java.io.InputStream is, SparkConf sparkConf, byte[] key)
InputStream
with CryptoInputStream
for decryption.is
- (undocumented)sparkConf
- (undocumented)key
- (undocumented)public static java.util.Properties toCryptoConf(SparkConf conf)
conf
- (undocumented)public static byte[] createKey(SparkConf conf)
conf
- (undocumented)