public class AES128Cryptor extends AESCryptorAbstract
Constructor and Description |
---|
AES128Cryptor()
Constructor for DefaultCryptor.
|
Modifier and Type | Method and Description |
---|---|
String |
decrypt(String str)
Encrypt the string
|
String |
encrypt(String str)
Encrypt the string
|
protected String |
getKey() |
String |
newKey() |
GEN
public AES128Cryptor() throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException
protected String getKey()
getKey
in class AESCryptorAbstract
public String encrypt(String str) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException, UnsupportedEncodingException
AESCryptorAbstract
encrypt
in interface Cryptor
encrypt
in class AESCryptorAbstract
NoSuchPaddingException
NoSuchAlgorithmException
InvalidAlgorithmParameterException
InvalidKeyException
IllegalBlockSizeException
BadPaddingException
UnsupportedEncodingException
public String decrypt(String str) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException, UnsupportedEncodingException
AESCryptorAbstract
decrypt
in interface Cryptor
decrypt
in class AESCryptorAbstract
NoSuchPaddingException
NoSuchAlgorithmException
InvalidAlgorithmParameterException
InvalidKeyException
IllegalBlockSizeException
BadPaddingException
UnsupportedEncodingException
public String newKey()
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.