Example usage for org.apache.wicket.settings SecuritySettings DEFAULT_ENCRYPTION_KEY

List of usage examples for org.apache.wicket.settings SecuritySettings DEFAULT_ENCRYPTION_KEY

Introduction

In this page you can find the example usage for org.apache.wicket.settings SecuritySettings DEFAULT_ENCRYPTION_KEY.

Prototype

String DEFAULT_ENCRYPTION_KEY

To view the source code for org.apache.wicket.settings SecuritySettings DEFAULT_ENCRYPTION_KEY.

Click Source Link

Document

encryption key used by default crypt factory

Usage

From source file:com.mastfrog.acteur.wicket.borrowed.WicketExampleApplication.java

License:Apache License

/**
 * @see org.apache.wicket.protocol.http.WebApplication#init()
 *//* w  w w  .  ja v  a  2 s.c  o m*/
@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);
}