Package net.wedjaa.ansible.vault.crypto
Class VaultHandler
- java.lang.Object
-
- net.wedjaa.ansible.vault.crypto.VaultHandler
-
public final class VaultHandler extends Object
Created by mrwho on 03/06/15.
-
-
Field Summary
Fields Modifier and Type Field Description static Charset
CHAR_ENCODING
Character encodingstatic String
DEFAULT_CYPHER
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Field Detail
-
DEFAULT_CYPHER
public static final String DEFAULT_CYPHER
- See Also:
- Constant Field Values
-
CHAR_ENCODING
public static final Charset CHAR_ENCODING
Character encoding
-
-
Method Detail
-
encrypt
public static byte[] encrypt(byte[] cleartext, String password, String cypher) throws IOException
- Throws:
IOException
-
encrypt
public static byte[] encrypt(byte[] cleartext, String password) throws IOException
- Throws:
IOException
-
encrypt
public static void encrypt(InputStream clearText, OutputStream cipherText, String password, String cypher) throws IOException
- Throws:
IOException
-
encrypt
public static void encrypt(InputStream clearText, OutputStream cipherText, String password) throws IOException
- Throws:
IOException
-
decrypt
public static void decrypt(InputStream encryptedVault, OutputStream decryptedVault, String password) throws IOException
- Throws:
IOException
-
decrypt
public static byte[] decrypt(byte[] encrypted, String password) throws IOException
- Throws:
IOException
-
-