public function getToken()
    {
        $key = $this->getGenerator()->getBytes(self::TOKEN_LENGTH);

        return base64_encode($key . $this->encryptToken($this->getTrueToken(), $key));
    }
public function getToken()
    {
        $key = $this->getGenerator()->getBytes(self::TOKEN_LENGTH);

        return base64_encode($key . $this->encryptToken($this->getTrueToken(), $key));
    }
public function getToken ( ) { $ key = $ this -> getGenerator ( ) -> getBytes ( self :: TOKEN_LENGTH ) ; return base64_encode ( $ key . $ this -> encryptToken ( $ this -> getTrueToken ( ) , $ key ) ) ; }
Generates a new secure base64 encoded csrf token.

This method returns a new string every time it is called, because it
always generates a new encryption key for the token. Of course, each of
these tokens is a valid CSRF token, unless the `regenerateToken()` method
is called.

@return string Base64 encoded CSRF token
@throws Storage\TokenStorageException If the secret token cannot be loaded or stored
Generates a new secure base64 encoded csrf token .