Class CypherAES256
java.lang.Object
net.wedjaa.ansible.vault.crypto.decoders.implementation.CypherAES256
- All Implemented Interfaces:
CypherInterface
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
calculateHMAC
(byte[] key, byte[] data) byte[]
void
decrypt
(OutputStream decodedStream, byte[] encryptedData, String password) byte[]
decryptAES
(byte[] cypher, byte[] key, byte[] iv) byte[]
void
encrypt
(OutputStream encodedStream, byte[] data, String password) byte[]
encryptAES
(byte[] cleartext, byte[] key, byte[] iv) infoLine()
byte[]
pad
(byte[] cleartext) int
paddingLength
(byte[] decrypted) byte[]
unpad
(byte[] decrypted) boolean
verifyHMAC
(byte[] hmac, byte[] key, byte[] data)
-
Field Details
-
CYPHER_ID
- See Also:
-
AES_KEYLEN
public static final int AES_KEYLEN- See Also:
-
CHAR_ENCODING
- See Also:
-
KEYGEN_ALGO
- See Also:
-
CYPHER_KEY_ALGO
- See Also:
-
CYPHER_ALGO
- See Also:
-
KEYLEN
public static final int KEYLEN- See Also:
-
IVLEN
public static final int IVLEN- See Also:
-
ITERATIONS
public static final int ITERATIONS- See Also:
-
-
Constructor Details
-
CypherAES256
public CypherAES256()
-
-
Method Details
-
calculateHMAC
- Throws:
IOException
-
verifyHMAC
- Throws:
IOException
-
paddingLength
public int paddingLength(byte[] decrypted) -
unpad
public byte[] unpad(byte[] decrypted) -
pad
public byte[] pad(byte[] cleartext) -
decryptAES
- Throws:
IOException
-
encryptAES
- Throws:
IOException
-
decrypt
- Specified by:
decrypt
in interfaceCypherInterface
- Throws:
IOException
-
decrypt
public void decrypt(OutputStream decodedStream, byte[] encryptedData, String password) throws IOException - Specified by:
decrypt
in interfaceCypherInterface
- Throws:
IOException
-
encrypt
- Specified by:
encrypt
in interfaceCypherInterface
- Throws:
IOException
-
infoLine
- Specified by:
infoLine
in interfaceCypherInterface
-
encrypt
- Specified by:
encrypt
in interfaceCypherInterface
- Throws:
IOException
-