public abstract class AESCryptorAbstract extends Object implements Cryptor
Constructor and Description |
---|
AESCryptorAbstract()
Constructor for DefaultCryptor.
|
Modifier and Type | Method and Description |
---|---|
String |
decrypt(String str)
Encrypt the string
|
String |
encrypt(String cleartext)
Encrypt the string
|
static String |
GEN(int keysize) |
protected abstract String |
getKey() |
public AESCryptorAbstract() throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException
protected abstract String getKey()
public String encrypt(String cleartext) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException
encrypt
in interface Cryptor
NoSuchPaddingException
NoSuchAlgorithmException
InvalidAlgorithmParameterException
InvalidKeyException
IllegalBlockSizeException
BadPaddingException
public String decrypt(String str) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException
decrypt
in interface Cryptor
NoSuchPaddingException
NoSuchAlgorithmException
InvalidAlgorithmParameterException
InvalidKeyException
IllegalBlockSizeException
BadPaddingException
public static String GEN(int keysize)
Copyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.