original_string: private function dispenseToken()
      {
          $token = bin2hex(random_bytes($this->config->getTokenLength())); // Generate token.
  
          $arr = array(
              'token' => $token,
              'expires' => time() + $this->config->getTokenTtl()
          ); // Prepare array containing token and expiry.
  
          $plain = Spyc::YAMLDump($arr); // Encode as YAML.
          $encrypted =  Encryption::encrypt($plain, $this->config->getSecretKey()); // Apply symmetric encryption.
  
          file_put_contents($this->config->getSessionFileName(), $encrypted); // Write to disk.
  
          return $token;
      }
code: private function dispenseToken()
      {
          $token = bin2hex(random_bytes($this->config->getTokenLength())); // Generate token.
  
          $arr = array(
              'token' => $token,
              'expires' => time() + $this->config->getTokenTtl()
          ); // Prepare array containing token and expiry.
  
          $plain = Spyc::YAMLDump($arr); // Encode as YAML.
          $encrypted =  Encryption::encrypt($plain, $this->config->getSecretKey()); // Apply symmetric encryption.
  
          file_put_contents($this->config->getSessionFileName(), $encrypted); // Write to disk.
  
          return $token;
      }
code_tokens: private function dispenseToken ( ) { $ token = bin2hex ( random_bytes ( $ this -> config -> getTokenLength ( ) ) ) ; // Generate token. $ arr = array ( 'token' => $ token , 'expires' => time ( ) + $ this -> config -> getTokenTtl ( ) ) ; // Prepare array containing token and expiry. $ plain = Spyc :: YAMLDump ( $ arr ) ; // Encode as YAML. $ encrypted = Encryption :: encrypt ( $ plain , $ this -> config -> getSecretKey ( ) ) ; // Apply symmetric encryption. file_put_contents ( $ this -> config -> getSessionFileName ( ) , $ encrypted ) ; // Write to disk. return $ token ; }
docstring: Dispenses a randomly generated authentication token.
  
  @return string
docstring_tokens: Dispenses a randomly generated authentication token .