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[]voiddecrypt(OutputStream decodedStream, byte[] encryptedData, String password) byte[]decryptAES(byte[] cypher, byte[] key, byte[] iv) byte[]voidencrypt(OutputStream encodedStream, byte[] data, String password) byte[]encryptAES(byte[] cleartext, byte[] key, byte[] iv) infoLine()byte[]pad(byte[] cleartext) intpaddingLength(byte[] decrypted) byte[]unpad(byte[] decrypted) booleanverifyHMAC(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:
decryptin interfaceCypherInterface- Throws:
IOException
-
decrypt
public void decrypt(OutputStream decodedStream, byte[] encryptedData, String password) throws IOException - Specified by:
decryptin interfaceCypherInterface- Throws:
IOException
-
encrypt
- Specified by:
encryptin interfaceCypherInterface- Throws:
IOException
-
infoLine
- Specified by:
infoLinein interfaceCypherInterface
-
encrypt
- Specified by:
encryptin interfaceCypherInterface- Throws:
IOException
-