Class AbstractKeyInSessionCryptFactory<T extends org.apache.wicket.util.io.IClusterable>
java.lang.Object
org.apache.wicket.core.util.crypt.AbstractKeyInSessionCryptFactory<T>
- Type Parameters:
T
- the type for the secret key.
- All Implemented Interfaces:
org.apache.wicket.util.crypt.ICryptFactory
- Direct Known Subclasses:
KeyInSessionSunJceCryptFactory
public abstract class AbstractKeyInSessionCryptFactory<T extends org.apache.wicket.util.io.IClusterable>
extends Object
implements org.apache.wicket.util.crypt.ICryptFactory
Base class to implement crypt factories that store crypt into user session. Note that the use of
this crypt factory will result in an immediate creation of a http session.
- Author:
- andrea del bene
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract org.apache.wicket.util.crypt.ICrypt
createCrypt
(T key) protected abstract T
generateKey
(Session session) Generates the secret key for a new crypt.org.apache.wicket.util.crypt.ICrypt
newCrypt()
Creates a new crypt for the current user session.
-
Constructor Details
-
AbstractKeyInSessionCryptFactory
public AbstractKeyInSessionCryptFactory()
-
-
Method Details
-
newCrypt
Creates a new crypt for the current user session. If no user session is available, a new one is created.- Specified by:
newCrypt
in interfaceorg.apache.wicket.util.crypt.ICryptFactory
- Returns:
-
generateKey
Generates the secret key for a new crypt.- Parameters:
session
- the current user session where crypt will be stored- Returns:
- the secret key for a new crypt
-
createCrypt
- Returns:
- the
ICrypt
to use
-