Class CryptoStreamUtils

Object
org.apache.spark.security.CryptoStreamUtils

public class CryptoStreamUtils extends Object
A util class for manipulating IO encryption and decryption streams.
  • Constructor Details

    • CryptoStreamUtils

      public CryptoStreamUtils()
  • Method Details

    • IV_LENGTH_IN_BYTES

      public static int IV_LENGTH_IN_BYTES()
    • SPARK_IO_ENCRYPTION_COMMONS_CONFIG_PREFIX

      public static String SPARK_IO_ENCRYPTION_COMMONS_CONFIG_PREFIX()
    • createCryptoOutputStream

      public static OutputStream createCryptoOutputStream(OutputStream os, SparkConf sparkConf, byte[] key)
      Helper method to wrap OutputStream with CryptoOutputStream for encryption.
      Parameters:
      os - (undocumented)
      sparkConf - (undocumented)
      key - (undocumented)
      Returns:
      (undocumented)
    • createWritableChannel

      public static WritableByteChannel createWritableChannel(WritableByteChannel channel, SparkConf sparkConf, byte[] key)
      Wrap a WritableByteChannel for encryption.
      Parameters:
      channel - (undocumented)
      sparkConf - (undocumented)
      key - (undocumented)
      Returns:
      (undocumented)
    • createCryptoInputStream

      public static InputStream createCryptoInputStream(InputStream is, SparkConf sparkConf, byte[] key)
      Helper method to wrap InputStream with CryptoInputStream for decryption.
      Parameters:
      is - (undocumented)
      sparkConf - (undocumented)
      key - (undocumented)
      Returns:
      (undocumented)
    • createReadableChannel

      public static ReadableByteChannel createReadableChannel(ReadableByteChannel channel, SparkConf sparkConf, byte[] key)
      Wrap a ReadableByteChannel for decryption.
      Parameters:
      channel - (undocumented)
      sparkConf - (undocumented)
      key - (undocumented)
      Returns:
      (undocumented)
    • toCryptoConf

      public static Properties toCryptoConf(SparkConf conf)
    • createKey

      public static byte[] createKey(SparkConf conf)
      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)