use of org.apache.wicket.util.crypt.NoCrypt in project wicket by apache.
the class CryptTest method noCrypt.
/**
*/
@Test
public void noCrypt() {
// The NoCrypt implementation does not modify the string at all
final ICrypt crypt = new NoCrypt();
assertEquals("test", crypt.encryptUrlSafe("test"));
assertEquals("test", crypt.decryptUrlSafe("test"));
}
use of org.apache.wicket.util.crypt.NoCrypt in project wicket by apache.
the class WicketExampleApplication method init.
@Override
protected void init() {
// WARNING: DO NOT do this on a real world application unless
// you really want your app's passwords all passed around and
// stored in unencrypted browser cookies (BAD IDEA!)!!!
// The NoCrypt class is being used here because not everyone
// has the java security classes required by Crypt installed
// and we want them to be able to run the examples out of the
// box.
getSecuritySettings().setCryptFactory(new ClassCryptFactory(NoCrypt.class, SecuritySettings.DEFAULT_ENCRYPTION_KEY));
getDebugSettings().setDevelopmentUtilitiesEnabled(true);
getResourceSettings().setCssCompressor(new CssUrlReplacer());
}
Aggregations