Package org.apache.spark.security
Class CryptoStreamUtils
Object
org.apache.spark.security.CryptoStreamUtils
A util class for manipulating IO encryption and decryption streams.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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- 
CryptoStreamUtilspublic CryptoStreamUtils()
 
- 
- 
Method Details- 
IV_LENGTH_IN_BYTESpublic static int IV_LENGTH_IN_BYTES()
- 
SPARK_IO_ENCRYPTION_COMMONS_CONFIG_PREFIX
- 
createCryptoOutputStreampublic static OutputStream createCryptoOutputStream(OutputStream os, SparkConf sparkConf, byte[] key) Helper method to wrapOutputStreamwithCryptoOutputStreamfor encryption.- Parameters:
- os- (undocumented)
- sparkConf- (undocumented)
- key- (undocumented)
- Returns:
- (undocumented)
 
- 
createWritableChannelpublic static WritableByteChannel createWritableChannel(WritableByteChannel channel, SparkConf sparkConf, byte[] key) Wrap aWritableByteChannelfor encryption.- Parameters:
- channel- (undocumented)
- sparkConf- (undocumented)
- key- (undocumented)
- Returns:
- (undocumented)
 
- 
createCryptoInputStreamHelper method to wrapInputStreamwithCryptoInputStreamfor decryption.- Parameters:
- is- (undocumented)
- sparkConf- (undocumented)
- key- (undocumented)
- Returns:
- (undocumented)
 
- 
createReadableChannelpublic static ReadableByteChannel createReadableChannel(ReadableByteChannel channel, SparkConf sparkConf, byte[] key) Wrap aReadableByteChannelfor decryption.- Parameters:
- channel- (undocumented)
- sparkConf- (undocumented)
- key- (undocumented)
- Returns:
- (undocumented)
 
- 
toCryptoConf
- 
createKeyCreates 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__$eqpublic static void org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1) 
- 
LogStringContextpublic static org.apache.spark.internal.Logging.LogStringContext LogStringContext(scala.StringContext sc) 
 
-