public class VaultHandler extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CHAR_ENCODING |
static int |
DEFAULT_BUFFER_SIZE
The default buffer size (8192) to use in copy methods.
|
static String |
DEFAULT_CYPHER |
static int |
EOF
Represents the end-of-file (or stream).
|
Constructor and Description |
---|
VaultHandler() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
decrypt(byte[] encrypted,
String password) |
static void |
decrypt(InputStream encryptedVault,
OutputStream decryptedVault,
String password) |
static byte[] |
encrypt(byte[] cleartext,
String password) |
static byte[] |
encrypt(byte[] cleartext,
String password,
String cypher) |
static void |
encrypt(InputStream clearText,
OutputStream cipherText,
String password) |
static void |
encrypt(InputStream clearText,
OutputStream cipherText,
String password,
String cypher) |
static byte[] |
toByteArray(InputStream input)
Gets the contents of an
InputStream as a byte[] . |
public static final String DEFAULT_CYPHER
public static final String CHAR_ENCODING
public static final int EOF
public static final int DEFAULT_BUFFER_SIZE
public static byte[] encrypt(byte[] cleartext, String password, String cypher) throws IOException
IOException
public static byte[] encrypt(byte[] cleartext, String password) throws IOException
IOException
public static void encrypt(InputStream clearText, OutputStream cipherText, String password, String cypher) throws IOException
IOException
public static void encrypt(InputStream clearText, OutputStream cipherText, String password) throws IOException
IOException
public static void decrypt(InputStream encryptedVault, OutputStream decryptedVault, String password) throws IOException
IOException
public static byte[] decrypt(byte[] encrypted, String password) throws IOException
IOException
public static byte[] toByteArray(InputStream input) throws IOException
InputStream
as a byte[]
.
This method buffers the input internally, so there is no need to use a
BufferedInputStream
.
input
- the InputStream
to read fromNullPointerException
- if the input is nullIOException
- if an I/O error occursCopyright © 2023 Frank!Framework. All rights reserved.