Package fr.dyade.aaa.common.crypto
Class AESTool
- java.lang.Object
-
- fr.dyade.aaa.common.crypto.CryptoTool
-
- fr.dyade.aaa.common.crypto.AESTool
-
- All Implemented Interfaces:
Crypto
public class AESTool extends CryptoTool
-
-
Field Summary
Fields Modifier and Type Field Description private Stringalgorithmprivate IvParameterSpeciv-
Fields inherited from class fr.dyade.aaa.common.crypto.CryptoTool
key
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CryptocreateCrypto(String algorithm, String password, String salt, String iv, int iterationCount, int keyLength)(package private) CiphergetCipher(int mode)(package private) CiphergetCipher(int mode, byte[] nonce)
-
-
-
Field Detail
-
algorithm
private String algorithm
-
iv
private IvParameterSpec iv
-
-
Constructor Detail
-
AESTool
public AESTool(String password, String salt, String nonce, int iterationCount, int keyLength) throws NoSuchAlgorithmException, InvalidKeySpecException
-
AESTool
public AESTool(String algorithm, String password, String salt, String nonce, int iterationCount, int keyLength) throws NoSuchAlgorithmException, InvalidKeySpecException
-
-
Method Detail
-
getCipher
Cipher getCipher(int mode) throws GeneralSecurityException
- Specified by:
getCipherin classCryptoTool- Throws:
GeneralSecurityException
-
getCipher
Cipher getCipher(int mode, byte[] nonce) throws GeneralSecurityException
- Specified by:
getCipherin classCryptoTool- Throws:
GeneralSecurityException
-
createCrypto
public static Crypto createCrypto(String algorithm, String password, String salt, String iv, int iterationCount, int keyLength) throws NoSuchAlgorithmException, InvalidKeySpecException
-
-