original_string: public function sign($http_method, $url, $params, $secret) {
          $sig = array(
              strtoupper($http_method),
              preg_replace('/%7E/', '~', rawurlencode($url)),
              rawurlencode($this->get_signable_parameters($params)),
          );
  
          $base_string = implode('&', $sig);
          $sig = base64_encode(hash_hmac('sha1', $base_string, $secret, true));
          return $sig;
      }
code: public function sign($http_method, $url, $params, $secret) {
          $sig = array(
              strtoupper($http_method),
              preg_replace('/%7E/', '~', rawurlencode($url)),
              rawurlencode($this->get_signable_parameters($params)),
          );
  
          $base_string = implode('&', $sig);
          $sig = base64_encode(hash_hmac('sha1', $base_string, $secret, true));
          return $sig;
      }
code_tokens: public function sign ( $ http_method , $ url , $ params , $ secret ) { $ sig = array ( strtoupper ( $ http_method ) , preg_replace ( '/%7E/' , '~' , rawurlencode ( $ url ) ) , rawurlencode ( $ this -> get_signable_parameters ( $ params ) ) , ) ; $ base_string = implode ( '&' , $ sig ) ; $ sig = base64_encode ( hash_hmac ( 'sha1' , $ base_string , $ secret , true ) ) ; return $ sig ; }
docstring: Create signature for oauth request
  @param string $url
  @param string $secret
  @param array $params
  @return string
docstring_tokens: Create signature for oauth request