java.lang.Object
org.apache.wicket.core.util.crypt.AbstractJceCrypt
- All Implemented Interfaces:
ICrypt
- Direct Known Subclasses:
AESCrypt
Base class for JCE based ICrypt implementations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract byte[]
decrypt
(byte[] encrypted) Decrypts an encrypted byte array.final String
decryptUrlSafe
(String text) Decrypts a string into a string.protected abstract byte[]
encrypt
(byte[] plainBytes) Encrypts the given text into a byte array.final String
encryptUrlSafe
(String plainText) Encrypt a string into a string using URL safe Base64 encoding.
-
Constructor Details
-
AbstractJceCrypt
public AbstractJceCrypt()
-
-
Method Details
-
decryptUrlSafe
Decrypts a string into a string.- Specified by:
decryptUrlSafe
in interfaceICrypt
- Parameters:
text
- text to decrypt- Returns:
- the decrypted text
-
encryptUrlSafe
Encrypt a string into a string using URL safe Base64 encoding.- Specified by:
encryptUrlSafe
in interfaceICrypt
- Parameters:
plainText
- text to encrypt- Returns:
- encrypted string
-
decrypt
Decrypts an encrypted byte array.- Parameters:
encrypted
- byte array to decrypt- Returns:
- the decrypted text
-
encrypt
Encrypts the given text into a byte array.- Parameters:
plainBytes
- text to encrypt- Returns:
- the string encrypted
-