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
-
Method Summary
Modifier and TypeMethodDescriptionstatic InputStream
createCryptoInputStream
(InputStream is, SparkConf sparkConf, byte[] key) Helper method to wrapInputStream
withCryptoInputStream
for decryption.static OutputStream
createCryptoOutputStream
(OutputStream os, SparkConf sparkConf, byte[] key) Helper method to wrapOutputStream
withCryptoOutputStream
for encryption.static byte[]
Creates a new encryption key.static ReadableByteChannel
createReadableChannel
(ReadableByteChannel channel, SparkConf sparkConf, byte[] key) Wrap aReadableByteChannel
for decryption.static WritableByteChannel
createWritableChannel
(WritableByteChannel channel, SparkConf sparkConf, byte[] key) Wrap aWritableByteChannel
for encryption.static int
static org.apache.spark.internal.Logging.LogStringContext
LogStringContext
(scala.StringContext sc) static org.slf4j.Logger
static void
org$apache$spark$internal$Logging$$log__$eq
(org.slf4j.Logger x$1) static String
static Properties
toCryptoConf
(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 wrapOutputStream
withCryptoOutputStream
for encryption.- Parameters:
os
- (undocumented)sparkConf
- (undocumented)key
- (undocumented)- Returns:
- (undocumented)
-
createWritableChannel
public static WritableByteChannel createWritableChannel(WritableByteChannel channel, SparkConf sparkConf, byte[] key) Wrap aWritableByteChannel
for encryption.- Parameters:
channel
- (undocumented)sparkConf
- (undocumented)key
- (undocumented)- Returns:
- (undocumented)
-
createCryptoInputStream
Helper method to wrapInputStream
withCryptoInputStream
for decryption.- Parameters:
is
- (undocumented)sparkConf
- (undocumented)key
- (undocumented)- Returns:
- (undocumented)
-
createReadableChannel
public static ReadableByteChannel createReadableChannel(ReadableByteChannel channel, SparkConf sparkConf, byte[] key) Wrap aReadableByteChannel
for 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)
-