original_string: protected function _hmacSha1($request, $credentials)
      {
          $nonce = isset($credentials['nonce']) ? $credentials['nonce'] : uniqid();
          $timestamp = isset($credentials['timestamp']) ? $credentials['timestamp'] : time();
          $values = [
              'oauth_version' => '1.0',
              'oauth_nonce' => $nonce,
              'oauth_timestamp' => $timestamp,
              'oauth_signature_method' => 'HMAC-SHA1',
              'oauth_token' => $credentials['token'],
              'oauth_consumer_key' => $credentials['consumerKey'],
          ];
          $baseString = $this->baseString($request, $values);
  
          if (isset($credentials['realm'])) {
              $values['oauth_realm'] = $credentials['realm'];
          }
          $key = [$credentials['consumerSecret'], $credentials['tokenSecret']];
          $key = array_map([$this, '_encode'], $key);
          $key = implode('&', $key);
  
          $values['oauth_signature'] = base64_encode(
              hash_hmac('sha1', $baseString, $key, true)
          );
  
          return $this->_buildAuth($values);
      }
code: protected function _hmacSha1($request, $credentials)
      {
          $nonce = isset($credentials['nonce']) ? $credentials['nonce'] : uniqid();
          $timestamp = isset($credentials['timestamp']) ? $credentials['timestamp'] : time();
          $values = [
              'oauth_version' => '1.0',
              'oauth_nonce' => $nonce,
              'oauth_timestamp' => $timestamp,
              'oauth_signature_method' => 'HMAC-SHA1',
              'oauth_token' => $credentials['token'],
              'oauth_consumer_key' => $credentials['consumerKey'],
          ];
          $baseString = $this->baseString($request, $values);
  
          if (isset($credentials['realm'])) {
              $values['oauth_realm'] = $credentials['realm'];
          }
          $key = [$credentials['consumerSecret'], $credentials['tokenSecret']];
          $key = array_map([$this, '_encode'], $key);
          $key = implode('&', $key);
  
          $values['oauth_signature'] = base64_encode(
              hash_hmac('sha1', $baseString, $key, true)
          );
  
          return $this->_buildAuth($values);
      }
code_tokens: protected function _hmacSha1 ( $ request , $ credentials ) { $ nonce = isset ( $ credentials [ 'nonce' ] ) ? $ credentials [ 'nonce' ] : uniqid ( ) ; $ timestamp = isset ( $ credentials [ 'timestamp' ] ) ? $ credentials [ 'timestamp' ] : time ( ) ; $ values = [ 'oauth_version' => '1.0' , 'oauth_nonce' => $ nonce , 'oauth_timestamp' => $ timestamp , 'oauth_signature_method' => 'HMAC-SHA1' , 'oauth_token' => $ credentials [ 'token' ] , 'oauth_consumer_key' => $ credentials [ 'consumerKey' ] , ] ; $ baseString = $ this -> baseString ( $ request , $ values ) ; if ( isset ( $ credentials [ 'realm' ] ) ) { $ values [ 'oauth_realm' ] = $ credentials [ 'realm' ] ; } $ key = [ $ credentials [ 'consumerSecret' ] , $ credentials [ 'tokenSecret' ] ] ; $ key = array_map ( [ $ this , '_encode' ] , $ key ) ; $ key = implode ( '&' , $ key ) ; $ values [ 'oauth_signature' ] = base64_encode ( hash_hmac ( 'sha1' , $ baseString , $ key , true ) ) ; return $ this -> _buildAuth ( $ values ) ; }
docstring: Use HMAC-SHA1 signing.
  
  This method is suitable for plain HTTP or HTTPS.
  
  @param \Cake\Http\Client\Request $request The request object.
  @param array $credentials Authentication credentials.
  @return string
docstring_tokens: Use HMAC - SHA1 signing .