public static function getNonce($action, $previousTick = false)
    {
        // Don't regenerate this again if not needed
        if (isset(static::$nonces[$action][$previousTick])) {
            return static::$nonces[$action][$previousTick];
        }
        $nonce = md5(self::generateNonceString($action, $previousTick));
        static::$nonces[$action][$previousTick] = $nonce;

        return static::$nonces[$action][$previousTick];
    }
public static function getNonce($action, $previousTick = false)
    {
        // Don't regenerate this again if not needed
        if (isset(static::$nonces[$action][$previousTick])) {
            return static::$nonces[$action][$previousTick];
        }
        $nonce = md5(self::generateNonceString($action, $previousTick));
        static::$nonces[$action][$previousTick] = $nonce;

        return static::$nonces[$action][$previousTick];
    }
public static function getNonce ( $ action , $ previousTick = false ) { // Don't regenerate this again if not needed if ( isset ( static :: $ nonces [ $ action ] [ $ previousTick ] ) ) { return static :: $ nonces [ $ action ] [ $ previousTick ] ; } $ nonce = md5 ( self :: generateNonceString ( $ action , $ previousTick ) ) ; static :: $ nonces [ $ action ] [ $ previousTick ] = $ nonce ; return static :: $ nonces [ $ action ] [ $ previousTick ] ; }
Creates a hashed nonce tied to the passed action. Tied to the current user and time. The nonce for a given
action is the same for 12 hours.

@param string $action      the action the nonce is tied to (e.g. save-user-admin or move-page-homepage)
@param bool   $previousTick if true, generates the token for the previous tick (the previous 12 hours)

@return string the nonce
Creates a hashed nonce tied to the passed action . Tied to the current user and time . The nonce for a given action is the same for 12 hours .