Class DefaultCrypter
- java.lang.Object
-
- org.apache.wicket.pageStore.crypt.DefaultCrypter
-
- All Implemented Interfaces:
ICrypter
public class DefaultCrypter extends Object implements ICrypter
Default encryption and decryption implementation.
-
-
Constructor Summary
Constructors Constructor Description DefaultCrypter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
decrypt(byte[] encrypted, SecretKey key)
byte[]
encrypt(byte[] decrypted, SecretKey key, SecureRandom random)
SecretKey
generateKey(SecureRandom random)
protected Cipher
getCipher()
-
-
-
Constructor Detail
-
DefaultCrypter
public DefaultCrypter()
-
-
Method Detail
-
getCipher
protected Cipher getCipher() throws GeneralSecurityException
- Throws:
GeneralSecurityException
-
generateKey
public SecretKey generateKey(SecureRandom random)
- Specified by:
generateKey
in interfaceICrypter
-
encrypt
public byte[] encrypt(byte[] decrypted, SecretKey key, SecureRandom random)
-
-