use of org.apache.wicket.util.crypt.ICryptFactory in project wicket by apache.
the class CryptoMapperTest method before.
/**
* Creates the {@link CryptoMapper}
*
* @throws Exception
*/
@Before
public void before() throws Exception {
tester = new WicketTester(HomePage.class);
WebApplication application = tester.getApplication();
application.mountPage(MOUNTED_URL, Page1.class);
/**
* Use explicit crypt provider to prevent crypt warning output, see
* SecuritySettings#getCryptFactory()
*/
Supplier<ICrypt> cryptProvider = new Supplier<ICrypt>() {
private ICryptFactory cryptFactory = new CachingSunJceCryptFactory(SecuritySettings.DEFAULT_ENCRYPTION_KEY);
@Override
public ICrypt get() {
return cryptFactory.newCrypt();
}
};
mapper = new CryptoMapper(application.getRootRequestMapper(), cryptProvider);
}
Aggregations