public class CryptoStreamUtils
extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
CryptoStreamUtils.BaseErrorHandler
SPARK-25535.
|
static class |
CryptoStreamUtils.ErrorHandlingReadableChannel |
Constructor and Description |
---|
CryptoStreamUtils() |
Modifier and Type | Method and Description |
---|---|
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 java.nio.channels.ReadableByteChannel |
createReadableChannel(java.nio.channels.ReadableByteChannel channel,
SparkConf sparkConf,
byte[] key)
Wrap a
ReadableByteChannel for decryption. |
static java.nio.channels.WritableByteChannel |
createWritableChannel(java.nio.channels.WritableByteChannel channel,
SparkConf sparkConf,
byte[] key)
Wrap a
WritableByteChannel for encryption. |
static int |
IV_LENGTH_IN_BYTES() |
static String |
SPARK_IO_ENCRYPTION_COMMONS_CONFIG_PREFIX() |
static java.util.Properties |
toCryptoConf(SparkConf conf) |
public static int IV_LENGTH_IN_BYTES()
public static String SPARK_IO_ENCRYPTION_COMMONS_CONFIG_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.nio.channels.WritableByteChannel createWritableChannel(java.nio.channels.WritableByteChannel channel, SparkConf sparkConf, byte[] key)
WritableByteChannel
for encryption.channel
- (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.nio.channels.ReadableByteChannel createReadableChannel(java.nio.channels.ReadableByteChannel channel, SparkConf sparkConf, byte[] key)
ReadableByteChannel
for decryption.channel
- (undocumented)sparkConf
- (undocumented)key
- (undocumented)public static java.util.Properties toCryptoConf(SparkConf conf)
public static byte[] createKey(SparkConf conf)
conf
- (undocumented)