public function regenerateSlug()
    {
        $this->slugWorkingRecord->{$this->slugDbField} = $this->encrypt();
        $salt = $this->slugSalt;

        if ($this->mustBeUnique && !$this->hasUniqueSlug()) {
            $generator = new RandomGenerator();

            while (!$this->hasUniqueSlug()) {
                $salt = $generator->randomToken();
                $this->slugWorkingRecord->{$this->slugDbField} = $this->encrypt(null, $salt);
            }
        }

        $this->slugWorkingRecord->{$this->slugDbFieldForSalt} = $salt;
    }