original_string: public function parseAuthData($digest)
      {
          if (substr($digest, 0, 7) === 'Digest ') {
              $digest = substr($digest, 7);
          }
          $keys = $match = [];
          $req = ['nonce' => 1, 'nc' => 1, 'cnonce' => 1, 'qop' => 1, 'username' => 1, 'uri' => 1, 'response' => 1];
          preg_match_all('/(\w+)=([\'"]?)([a-zA-Z0-9\:\#\%\?\&@=\.\/_-]+)\2/', $digest, $match, PREG_SET_ORDER);
  
          foreach ($match as $i) {
              $keys[$i[1]] = $i[3];
              unset($req[$i[1]]);
          }
  
          if (empty($req)) {
              return $keys;
          }
  
          return null;
      }
code: public function parseAuthData($digest)
      {
          if (substr($digest, 0, 7) === 'Digest ') {
              $digest = substr($digest, 7);
          }
          $keys = $match = [];
          $req = ['nonce' => 1, 'nc' => 1, 'cnonce' => 1, 'qop' => 1, 'username' => 1, 'uri' => 1, 'response' => 1];
          preg_match_all('/(\w+)=([\'"]?)([a-zA-Z0-9\:\#\%\?\&@=\.\/_-]+)\2/', $digest, $match, PREG_SET_ORDER);
  
          foreach ($match as $i) {
              $keys[$i[1]] = $i[3];
              unset($req[$i[1]]);
          }
  
          if (empty($req)) {
              return $keys;
          }
  
          return null;
      }
code_tokens: public function parseAuthData ( $ digest ) { if ( substr ( $ digest , 0 , 7 ) === 'Digest ' ) { $ digest = substr ( $ digest , 7 ) ; } $ keys = $ match = [ ] ; $ req = [ 'nonce' => 1 , 'nc' => 1 , 'cnonce' => 1 , 'qop' => 1 , 'username' => 1 , 'uri' => 1 , 'response' => 1 ] ; preg_match_all ( '/(\w+)=([\'"]?)([a-zA-Z0-9\:\#\%\?\&@=\.\/_-]+)\2/' , $ digest , $ match , PREG_SET_ORDER ) ; foreach ( $ match as $ i ) { $ keys [ $ i [ 1 ] ] = $ i [ 3 ] ; unset ( $ req [ $ i [ 1 ] ] ) ; } if ( empty ( $ req ) ) { return $ keys ; } return null ; }
docstring: Parse the digest authentication headers and split them up.
  
  @param string $digest The raw digest authentication headers.
  @return array|null An array of digest authentication headers
docstring_tokens: Parse the digest authentication headers and split them up .