@InterfaceAudience.Private @InterfaceStability.Unstable public class CryptoUtils extends Object
Constructor and Description |
---|
CryptoUtils() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
createIV(org.apache.hadoop.conf.Configuration conf)
This method creates and initializes an IV (Initialization Vector)
|
static int |
cryptoPadding(org.apache.hadoop.conf.Configuration conf) |
static boolean |
isEncryptedSpillEnabled(org.apache.hadoop.conf.Configuration conf) |
static org.apache.hadoop.fs.FSDataInputStream |
wrapIfNecessary(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FSDataInputStream in)
Wraps a given FSDataInputStream with a CryptoInputStream.
|
static org.apache.hadoop.fs.FSDataOutputStream |
wrapIfNecessary(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FSDataOutputStream out)
Wraps a given FSDataOutputStream with a CryptoOutputStream.
|
static org.apache.hadoop.fs.FSDataOutputStream |
wrapIfNecessary(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FSDataOutputStream out,
boolean closeOutputStream)
Wraps a given FSDataOutputStream with a CryptoOutputStream.
|
static InputStream |
wrapIfNecessary(org.apache.hadoop.conf.Configuration conf,
InputStream in,
long length)
Wraps a given InputStream with a CryptoInputStream.
|
public static boolean isEncryptedSpillEnabled(org.apache.hadoop.conf.Configuration conf)
public static byte[] createIV(org.apache.hadoop.conf.Configuration conf) throws IOException
conf
- configurationIOException
- exception in case of errorpublic static int cryptoPadding(org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public static org.apache.hadoop.fs.FSDataOutputStream wrapIfNecessary(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FSDataOutputStream out) throws IOException
conf
- configurationout
- given output streamIOException
- exception in case of errorpublic static org.apache.hadoop.fs.FSDataOutputStream wrapIfNecessary(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FSDataOutputStream out, boolean closeOutputStream) throws IOException
conf
- configurationout
- given output streamcloseOutputStream
- flag to indicate whether closing the wrapped
stream will close the given output streamIOException
- exception in case of errorpublic static InputStream wrapIfNecessary(org.apache.hadoop.conf.Configuration conf, InputStream in, long length) throws IOException
conf
- configurationin
- given input streamlength
- maximum number of bytes to read from the input streamIOException
- exception in case of errorpublic static org.apache.hadoop.fs.FSDataInputStream wrapIfNecessary(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FSDataInputStream in) throws IOException
conf
- configurationin
- given input streamIOException
- exception in case of errorCopyright © 2020 Apache Software Foundation. All rights reserved.