Package org.apache.spark.security
Class CryptoStreamUtils
Object
org.apache.spark.security.CryptoStreamUtils
A util class for manipulating IO encryption and decryption streams.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InputStreamcreateCryptoInputStream(InputStream is, SparkConf sparkConf, byte[] key) Helper method to wrapInputStreamwithCryptoInputStreamfor decryption.static OutputStreamcreateCryptoOutputStream(OutputStream os, SparkConf sparkConf, byte[] key) Helper method to wrapOutputStreamwithCryptoOutputStreamfor encryption.static byte[]Creates a new encryption key.static ReadableByteChannelcreateReadableChannel(ReadableByteChannel channel, SparkConf sparkConf, byte[] key) Wrap aReadableByteChannelfor decryption.static WritableByteChannelcreateWritableChannel(WritableByteChannel channel, SparkConf sparkConf, byte[] key) Wrap aWritableByteChannelfor encryption.static intstatic org.apache.spark.internal.Logging.LogStringContextLogStringContext(scala.StringContext sc) static org.slf4j.Loggerstatic voidorg$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1) static Stringstatic PropertiestoCryptoConf(SparkConf conf)
-
Constructor Details
-
CryptoStreamUtils
public CryptoStreamUtils()
-
-
Method Details
-
IV_LENGTH_IN_BYTES
public static int IV_LENGTH_IN_BYTES() -
SPARK_IO_ENCRYPTION_COMMONS_CONFIG_PREFIX
-
createCryptoOutputStream
public static OutputStream createCryptoOutputStream(OutputStream os, SparkConf sparkConf, byte[] key) Helper method to wrapOutputStreamwithCryptoOutputStreamfor encryption.- Parameters:
os- (undocumented)sparkConf- (undocumented)key- (undocumented)- Returns:
- (undocumented)
-
createWritableChannel
public static WritableByteChannel createWritableChannel(WritableByteChannel channel, SparkConf sparkConf, byte[] key) Wrap aWritableByteChannelfor encryption.- Parameters:
channel- (undocumented)sparkConf- (undocumented)key- (undocumented)- Returns:
- (undocumented)
-
createCryptoInputStream
Helper method to wrapInputStreamwithCryptoInputStreamfor decryption.- Parameters:
is- (undocumented)sparkConf- (undocumented)key- (undocumented)- Returns:
- (undocumented)
-
createReadableChannel
public static ReadableByteChannel createReadableChannel(ReadableByteChannel channel, SparkConf sparkConf, byte[] key) Wrap aReadableByteChannelfor decryption.- Parameters:
channel- (undocumented)sparkConf- (undocumented)key- (undocumented)- Returns:
- (undocumented)
-
toCryptoConf
-
createKey
Creates a new encryption key.- Parameters:
conf- (undocumented)- Returns:
- (undocumented)
-
org$apache$spark$internal$Logging$$log_
public static org.slf4j.Logger org$apache$spark$internal$Logging$$log_() -
org$apache$spark$internal$Logging$$log__$eq
public static void org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1) -
LogStringContext
public static org.apache.spark.internal.Logging.LogStringContext LogStringContext(scala.StringContext sc)
-