src/Dev/DevelopmentAdmin.php
public function generatesecuretoken()
    {
        $generator = Injector::inst()->create('SilverStripe\\Security\\RandomGenerator');
        $token = $generator->randomToken('sha1');
        $body = <<<TXT
Generated new token. Please add the following code to your YAML configuration:

Security:
  token: $token

TXT;
        $response = new HTTPResponse($body);
        return $response->addHeader('Content-Type', 'text/plain');
    }
public function generatesecuretoken()
    {
        $generator = Injector::inst()->create('SilverStripe\\Security\\RandomGenerator');
        $token = $generator->randomToken('sha1');
        $body = <<<TXT
Generated new token. Please add the following code to your YAML configuration:

Security:
  token: $token

TXT;
        $response = new HTTPResponse($body);
        return $response->addHeader('Content-Type', 'text/plain');
    }
public function generatesecuretoken ( ) { $ generator = Injector :: inst ( ) -> create ( 'SilverStripe\\Security\\RandomGenerator' ) ; $ token = $ generator -> randomToken ( 'sha1' ) ; $ body =  <<<TXT
Generated new token. Please add the following code to your YAML configuration:

Security:
  token: $token

TXT ; $ response = new HTTPResponse ( $ body ) ; return $ response -> addHeader ( 'Content-Type' , 'text/plain' ) ; }
Generate a secure token which can be used as a crypto key.
Returns the token and suggests PHP configuration to set it.
Generate a secure token which can be used as a crypto key . Returns the token and suggests PHP configuration to set it .