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, UnsupportedEncodingException
encrypt in interface CryptorNoSuchPaddingExceptionNoSuchAlgorithmExceptionInvalidAlgorithmParameterExceptionInvalidKeyExceptionIllegalBlockSizeExceptionBadPaddingExceptionUnsupportedEncodingExceptionpublic String decrypt(String str) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException, UnsupportedEncodingException
decrypt in interface CryptorNoSuchPaddingExceptionNoSuchAlgorithmExceptionInvalidAlgorithmParameterExceptionInvalidKeyExceptionIllegalBlockSizeExceptionBadPaddingExceptionUnsupportedEncodingExceptionpublic static String GEN(int keysize)
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.