public function create($action)
    {
        $expire = time() + $this->timePeriod; // 24 hour expiration

        $user_id = $this->RequestContext->getUserRef();
        if(is_null($user_id))
            $user_id = $this->Session->getID();

        return $this->Encryption->encryptSecureCookie(strtolower($action), $expire, (string)$user_id);
    }
public function create($action)
    {
        $expire = time() + $this->timePeriod; // 24 hour expiration

        $user_id = $this->RequestContext->getUserRef();
        if(is_null($user_id))
            $user_id = $this->Session->getID();

        return $this->Encryption->encryptSecureCookie(strtolower($action), $expire, (string)$user_id);
    }
public function create ( $ action ) { $ expire = time ( ) + $ this -> timePeriod ; // 24 hour expiration $ user_id = $ this -> RequestContext -> getUserRef ( ) ; if ( is_null ( $ user_id ) ) $ user_id = $ this -> Session -> getID ( ) ; return $ this -> Encryption -> encryptSecureCookie ( strtolower ( $ action ) , $ expire , ( string ) $ user_id ) ; }
Creates a new nonce string for the given action, typically derived
from the user, a salt, and valid only for a given amount of time

@param string $action Arbitrary string action to create nonce for

@return string Nonce
Creates a new nonce string for the given action typically derived from the user a salt and valid only for a given amount of time